|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath expr on generated nodeset
I generated a nodeset by assigning elements to a variable and then converting
the fragment to a nodeset, but normal XPath expressions do not seem to work.
I would appreciate any help on figuring out what I am doing wrong. I am
using Xalan 2.4.0.
TIA
Al
<xsl:stylesheet exclude-result-prefixes="xalan" version="1.0"
xmlns="automationgroups.com/docdebug"
xmlns:xalan="http://xml.apache.org/xalan" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="aFrag">
<xsl:element name="aaa">
<xsl:element name="bbb">Stuff</xsl:element>
</xsl:element>
</xsl:variable>
<xsl:variable name="aNd" select="xalan:nodeset($aFrag)"/>
<xsl:element name="out">
<!-- This generates output -->
<xsl:element name="one">
<xsl:copy-of select="$aNd[1]/*[1]"/>
</xsl:element>
<!-- but this does not -->
<xsl:element name="two">
<xsl:copy-of select="$aNd//bbb"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Al Byers
Wasatch Automation Group, LLC
P.O. Box 1672
Orem, UT 84059
801.400.5111
byersa@xxxxxxxxxxxxxxxxxxxx
http://automationgroups.com/na/wasatch
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! 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
|

Cart








