Re: [xsl] Diagram of XPath axes

Subject: Re: [xsl] Diagram of XPath axes
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Fri, 25 May 2012 00:45:08 +0200
On 2012-05-25 00:11, Wendell Piez wrote:
Hi,

A rare slip from Gerrit? who surely means

select="//*[. &lt;&lt; current()]"

Yes, of course. Thanks, Wendell, for the correction, and for 'rare'.


For the sake of completeness:

<doc>
  <a/>
  <b>
    <c/>
  </b>
</doc>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0" >
<xsl:output method="text" />
<xsl:template match="c">
<xsl:message>preceding
<xsl:value-of select="preceding::*/name()" />
</xsl:message>
<xsl:message>&lt;&lt;
<xsl:value-of select="//*[. &lt;&lt; current()]/name()" />
</xsl:message>
<xsl:message>ancestor | preceding
<xsl:value-of select="(ancestor::* | preceding::*)/name()" />
</xsl:message>
</xsl:template>
</xsl:stylesheet>


b

preceding
      a
&lt;&lt;
      doc a b
ancestor | preceding
      doc a b

Current Thread