• 5 August 2022
  • 0 replies

Userlevel 2
Badge +2

This article is about the xslutil:nodeset Blend function.


Evaluates an expression and returns its meaning as a node set.


xslutil:nodeset( expression )

If expression can be construed as an XPath node set, this is what is returned.

If expression begins with a < character, an attempt is made to interpret it as a node set.

In remaining cases, as in the example below, expression is interpreted as a path leading to an XML document and if an XML file is found at the endpoint of the path, its content is returned as a node set.


This example returns the content of an XML document in a file named "c:\temp\root.xml" as a node set.

<pc:assign rootpath="c:\temp\root.xml"/>
<pc:copy-of select="xslutil:nodeset($rootpath)"/>

Contrast with the following, which returns a text node with string-value "c:temp\root.xml":

<pc:assign rootpath="c:\temp\root.xml"/>
<pc:copy-of select="$rootpath"/>


0 replies

Be the first to reply!