node-set

result tree fragment to node-set: generic approach for all xsl engines

允我心安 提交于 2019-11-28 01:16:46
问题 Answering another thread (see stackoverflow: generate css color schemes) I bumped into the issue below, where different xsl engines seem to need different approaches in transforming result tree fragments into node-sets. Simplifying the issue (but see link above for the full story behind this), I wish to have an inline tree containing a list of color values. As this has to be used in Xpath expressions, I had to create a node-set from it specifically for MSXML x.x xsl engine (XML Spy built-in

How can make an XSLT Javascript extension function return a node-set?

☆樱花仙子☆ 提交于 2019-11-27 08:17:01
问题 Is there a simple way to have an extension function in XSLT 1.0 written in javascript return a node-set? I could create a new java class for this, but I would rather just put some code in the script itself. When this can be done in another scripting language supported by all or most XSLT processors (VB script? Groovy? C#?), then that's OK too of course. I have the following simple script: <msxsl:script language="JScript" implements-prefix="custom"> function xml (input) { var x = input.split("