[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Global Variables in streaming xslts
On 15.08.2016 17:46, Mailing Lists Mail daktapaal@xxxxxxxxx wrote:
1. How do we get the global Xpaths.. That can be used else where. In my understand you have two options, one might be to use an accumulator to store the value of the other element, the other would be to use `copy-of()` on a common parent or ancestor and then work with that copy with normal template. Both solutions depend of course on the structure of the input and the relation of those two elements, I am not sure where in your tree the Amphibian are located in relation to the WaterSpeciesDisplayIndicator element(s). And of course the copy-of would pull a subtree into memory so is only useful in the context of streaming for closely related elements like siblings e.g. <foo> <bar>bar</bar> <baz>baz</bar> </foo> with e.g. <xsl:template match="foo"> <xsl:apply-templates select="copy-of()" mode="m2"/> </xsl:template> <xsl:template match="foo[bar = 'bar']/baz"> ... </xsl:template>
|
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
|