|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Node vs TreeFragment
> > > <xsl:variable name="theData" select="someParent/someNode[@a='aKey' and > > > @b='bKey' and @c='cKey']/data" /> > > On another note ... I'm trying to get at the node/treefragment that > would be represented by "data" above. FOP balks, saying that I can't > convert a treefragment into a nodelist. That's correct, you can't look inside a result tree fragment. XSLT 1.1 will eliminate the distinction, but in XSLT 1.0 you have to use an extension function to convert a result tree fragment to a node-set. Fortunately, vendors supply a foo:node-set() function with their XSLT processors. The namespace and typical prefix for the "foo" is dependent on the processor; check the docs for the one you are using. However in your case, you have not created a result tree fragment with the code above. You have only identified a node-set. It should not cause any problems as-is. I suspect you are actually trying to do something like <xsl:variable name="copiedData"> <xsl:copy-of select="$theData"> </xsl:variable> <xsl:value-of select="$copiedData/path/to/some/descendant/of/data"/> when you should just be doing <xsl:value-of select="$theData/path/to/some/descendant/of/data"/> 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








