title: XSL(T) and XPath preceding-sibling not working
body: <p>I have the following XML:</p>
  
  <pre><code>&lt;system-folder&gt;
      &lt;system-folder&gt;
          &lt;system-page&gt;
              &lt;display-name&gt;One&lt;/display-name&gt;
          &lt;/system-page&gt;
      &lt;/system-folder&gt;
      &lt;system-folder&gt;
          &lt;system-page&gt;
              &lt;display-name&gt;Two&lt;/display-name&gt;
          &lt;/system-page&gt;
      &lt;/system-folder&gt;
      &lt;system-folder current="true"&gt;
          &lt;system-page&gt;
              &lt;display-name&gt;Three&lt;/display-name&gt;
          &lt;/system-page&gt;
          &lt;system-page&gt;
              &lt;display-name&gt;Four&lt;/display-name&gt;
          &lt;/system-page&gt;
          &lt;system-page&gt;
              &lt;display-name&gt;Five&lt;/display-name&gt;
          &lt;/system-page&gt;
      &lt;/system-folder&gt;
  &lt;/system-folder&gt;
  </code></pre>
  
  <p>And the following code works as expected:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
      &lt;xsl:template match="/"&gt;
          &lt;xsl:for-each select="//system-folder[@current="true"]/..//system-page"&gt;
              Current: &lt;xsl:value-of select="display-name"/&gt;&lt;br/&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>And returns what I expected:</p>
  
  <pre><code>Current: One
  Current: Two
  Current: Three
  Current: Four
  Current: Five
  </code></pre>
  
  <p>But when I try to get the previous items using:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
      &lt;xsl:template match="/"&gt;
         &lt;xsl:for-each select="//system-folder[@current="true"]/..//system-page"&gt;
             Previous: &lt;xsl:value-of select="preceding-sibling::*[1]/display-name"/&gt;&lt;br/&gt;
             Current: &lt;xsl:value-of select="display-name"/&gt;&lt;br/&gt;&lt;br/&gt;
         &lt;/xsl:for-each&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Previous: 
  Current: One
  
  Previous: &lt;-- Why is this missing?
  Current: Two
  
  Previous: &lt;-- Why is this missing?
  Current: Three
  
  Previous: Three
  Current: Four
  
  Previous: Four
  Current: Five
  </code></pre>
  
  <p>Why are the two items above missing? It looks to me that the preceding-sibling isn't getting out of the folder. How can I resolve that?</p>
  
  <p>A lot of thanks to whoever can help me - I've been stuck on it for too long :(</p>