Using the "msxsl" prefix here had me confused for two seconds - let's use the more conventional "exslt" to avoid such misunderstanding.

The EXSLT specification of the node-set() function is here:

The main purpose of the function is to turn an XSLT 1.0 result-tree-fragment into a singleton node-set. That's a no-op in XSLT 2.0, so Saxon's implementation of exslt:node-set() is a no-op - it returns its argument unchanged.

Now, looking at the spec, that doesn't seem to be the right thing to do when you give it a string. The spec is very vague about what the function should do when given a string, but it does seem to be clear that the expected result is a node-set. Perhaps the idea is simply to turn the string into a text node. That doesn't seem to be your expectation, since you're expecting it to return a node that has descendants. I've also come across the expectation that the string should be treated as a path expression and evaluated, but there doesn't seem to be any hint of that in the spec. So what were you expecting the function to do?

Michael Kay

On 24/06/2011 09:19, dba03 wrote:
1. The error is:
net.sf.saxon.trans.XPathException: Required item type of first operand of '/' is node(); supplied value has item type xs:string
2. The xsl file:
<xsl:stylesheet version="2.0" 
  <xsl:template name ="CreateShape">
  <xsl:param name="varHyperLinksForShapes" select="''"/>
  <xsl:if test="msxsl:node-set($varHyperLinksForShapes)//presentation:event-listener">
  <xsl:copy-of select="$varHyperLinksForShapes"/>
Error occur at "msxsl:node-set($varHyperLinksForShapes)".

------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense..
_______________________________________________ saxon-help mailing list archived at