Re: [xslt] how to access default xml



I had some problemes with this to convert
$test-xmlfile to a node-set.
Sometimes it seems to be a result-tree-fragment.
With simple examples this works well, but I have
a strange behavior with big xml's and big xslt's.

I try to provide a more precise example.

> you want to put the original XML tree into a global variable so you can
> access it whenever you need. At the top level of the XSL, put:
>
> <xsl:variable name="default-xmlfile" select="/"/>
>
> Also, when you make repeated document function calls to the same document,
> why not put the result in a variable once and then reuse it.
>
> <xsl:variable name="test-xmlfile" select="document('test.xml')/rootnode"/>
>
> <xsl:apply-templates select="$test-xmlfile"/>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]