Re: [xsl] axis specifier issue

Subject: Re: [xsl] axis specifier issue
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 30 Oct 2009 18:20:08 +0100
a kusa wrote:
What I want is that any <note> element that is below <desc> and before<prt2>
to be pushed under <prt2>.

With XSLT 2.0 you can achieve that as follows:


  <xsl:template match="@* | node()">
      <xsl:apply-templates select="@*, node()"/>

<xsl:template match="prt1">
<xsl:apply-templates select="@*, node() except note[. &gt;&gt; current()/desc[1] and . &lt;&lt; current()/prt2[1]]"/>

<xsl:template match="prt2">
<xsl:apply-templates select="@*, preceding-sibling::note[. &gt;&gt; current()/preceding-sibling::desc[1]], node()"/>



	Martin Honnen

Current Thread