xsltexist-dbexslt

Passing a node as parameter to a XSL stylesheet


I need to pass a node as a parameter to an XSL stylesheet. The issue is that the parameter gets sent as a string. I have seen the several SO questions regarding this topic, and I know that the solution (in XSLT 1.0) is to use an external node-set() function to transform the string to a node set.

My issue is that I am using eXist DB I cannot seem to be able to get its XSLT processor to locate any such function. I have tried the EXSLT node-set() from the namespace http://exslt.org/common as well as both the Saxon and Xalan version (I think eXist used to use Xalan but now it might be Saxon).

Are these extensions even allowed in the XSLT processor used by eXist? If not, is there something else I can do?


Solution

  • As per Martin Honnen's comments I don't think it is possible to pass an XML node via the <parameters> structure of the transform:transform() function in eXist. The function seems to strip away any XML tags passed to it as a value.

    As a workaround I will wrap both my input XML and my parameter XML into a root element and pass that as input to the transform function.