Subject: Re: [xsl] Fetch a sequence of nodes from input file From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 23 Sep 2009 21:33:53 -0400 |
Thanks very much for these ideas. I'm trying to use Martin's solution but I don't understand the line: <xsl:copy-of select="$si | $si/following-sibling::item[. << $si/following-sibling::item[level <= $si/level][1]]"/>
What does << or << mean?
T:\ftemp>type rowan2.xsl <?xml version="1.0" encoding="US-ASCII"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/"> <xsl:variable name="tree1" as="element(doc)"> <doc> <a/> <b/> </doc> </xsl:variable> <xsl:variable name="tree2" as="element(doc)"> <doc> <a/> <b/> </doc> </xsl:variable>
1/a << 1/b: <xsl:value-of select="$tree1/a << $tree1/b"/> 1/a >> 1/b: <xsl:value-of select="$tree1/a >> $tree1/b"/> 1/a is 1/a: <xsl:value-of select="$tree1/a is $tree1/a"/> 1/a is 1/b: <xsl:value-of select="$tree1/a is $tree1/b"/> 1/a << 2/b: <xsl:value-of select="$tree1/a << $tree2/b"/> 1/a >> 2/b: <xsl:value-of select="$tree1/a >> $tree2/b"/> </xsl:template>
</xsl:stylesheet> T:\ftemp>xslt2 rowan2.xsl rowan2.xsl
1/a << 1/b: true 1/a >> 1/b: false 1/a is 1/a: true 1/a is 1/b: false 1/a << 2/b: true 1/a >> 2/b: false T:\ftemp>
-- Upcoming hands-on code list, UBL, XSLT, XQuery and XSL-FO classes. Interested in other classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fetch a sequence of nodes, rowan@xxxxxxxxxxxxxx | Thread | Re: [xsl] Fetch a sequence of nodes, Michael Ludwig |
Re: [xsl] Fetch a sequence of nodes, rowan@xxxxxxxxxxxxxx | Date | Re: [xsl] Fetch a sequence of nodes, Michael Ludwig |
Month |