title: xslt return selection of following siblings
body: <p>I have a selection of XML (edited)</p>
  
  <pre><code>&lt;items&gt;                 
      &lt;item id="00100537" label="A/137i r" lcn="005417713" notes="A/137-160"/&gt;
      &lt;item id="00100538" label="A/137i v" lcn="" notes=""/&gt;
      &lt;item id="00100539" label="A/137ii r" lcn="" notes=""/&gt;
      &lt;item id="00100540" label="A/137ii v" lcn="" notes=""/&gt;
      &lt;item id="00100678" label="A/159iii v" lcn="" notes=""/&gt;
      &lt;item id="00100679" label="A/159iv r" lcn="" notes=""/&gt;
      &lt;item id="00100680" label="A/159iv v" lcn="" notes=""/&gt;
      &lt;item id="00100681" label="A/160i r" lcn="" notes=""/&gt;
      &lt;item id="00100682" label="A/160i v" lcn="" notes=""/&gt;
      &lt;item id="00100683" label="A/160ii r" lcn="" notes=""/&gt;
      &lt;item id="00100684" label="A/160ii v" lcn="" notes=""/&gt;
      &lt;item id="00100685" label="A/160iii r" lcn="" notes=""/&gt;
      &lt;item id="00100686" label="A/160iii v" lcn="" notes=""/&gt;
      &lt;item id="00100687" label="A/161i r" lcn="005417714" notes="A/161-182"/&gt;
      &lt;item id="00100688" label="A/161i v" lcn="" notes=""/&gt;
      &lt;item id="00100819" label="A/182ii v" lcn="" notes=""/&gt;
      &lt;item id="00100820" label="A/182iii r" lcn="" notes=""/&gt;
      &lt;item id="00100821" label="A/182iii v" lcn="" notes=""/&gt;
      &lt;item id="00100822" label="A/183i r" lcn="005417715" notes="A/183-218"/&gt;
      &lt;item id="00100823" label="A/183i v" lcn="" notes=""/&gt;
      &lt;item id="00100975" label="A/216iii r" lcn="" notes=""/&gt;
      &lt;item id="00100976" label="A/216iii v" lcn="" notes=""/&gt;
      &lt;item id="00100977" label="A/217i r" lcn="" notes=""/&gt;
      &lt;item id="00100978" label="A/217i v" lcn="" notes=""/&gt;
      &lt;item id="00100979" label="A/217ii r" lcn="" notes=""/&gt;
      &lt;item id="00100980" label="A/217ii v" lcn="" notes=""/&gt;
      &lt;item id="00100981" label="A/218i r" lcn="" notes=""/&gt;
      &lt;item id="00100982" label="A/218i v" lcn="" notes=""/&gt;
      &lt;item id="00100983" label="A/218ii r" lcn="" notes=""/&gt;
      &lt;item id="00100984" label="A/218ii v" lcn="" notes=""/&gt;
      &lt;item id="00100985" label="A/219i r" lcn="005417716" notes="A/219-248"/&gt;
      &lt;item id="00100986" label="A/219 v" lcn="" notes=""/&gt;
      &lt;item id="00100987" label="A/219ii r" lcn="" notes=""/&gt;
      &lt;item id="00101061" label="A/248 r" lcn="" notes=""/&gt;
      &lt;item id="00101062" label="A/248 v" lcn="" notes=""/&gt;
  &lt;/items&gt;
  </code></pre>
  
  <p>I want to be able to get all following nodes from a given lcn before the next lcn.</p>
  
  <p>If I start at lcn='005417714' I know there are 4 following nodes.</p>
  
  <p>But when I try and do something like this</p>
  
  <pre><code>&lt;xsl:for-each select="/items/item[@lcn='005417714']/following-sibling::*"&gt;
  </code></pre>
  
  <p>I get all following-siblings. How can I get all following-siblings before the next non-empty lcn attribute? So retrieve only the 4 following siblings? thanks</p>