|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Conditional in-context nodeset variables
have problem
for example (as input any valid XHTML)
and context is first h1 node
<xsl:variable name="level1" select="following-sibling::h1[1]"/>
<xsl:variable name="level2" select="following-sibling::h2[1]"/>
<xsl:variable name="next-stop">
<xsl:choose>
<xsl:when test="not($level1 and $level2)">
<xsl:sequence select="following-sibling::*[last()]"/>
</xsl:when>
<xsl:when test="$level1 << $level2">
<xsl:sequence select="$level1"/>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="$level2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:apply-templates select="following-sibling::*[. << $next-stop]"/>
$level1 and $leve2 contain links to live in-context node
but variable $next-stop contain copy (not reference to node) of level1
or level2 variable
and even following-sibling::*[last()] provide just copy instead of
in-context nodeset
so << not work as expected :(
regards,
Slav
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







