[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Portability function-available tips

Subject: Re: [xsl] Portability function-available tips
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 9 Jan 2004 13:04:14 GMT

I wrote

    <msxsl:script language="JScript" implements-prefix="exsl">
       function node-set(r) {
    some javascript to return the thing cast to a node set
    which I'm sure you can do but don't have the doc to hand

which isn't entirely true: you could define such a function but
you can't call it node-set as jscript functions can't have - in their
names, and if you call it anything else it doesn't really help.

So you can use the same trick in the other direction: use msxsl:node-set,
and that works natively on msxsl and for exslt processors define that
function using exsltf:function, the following has been tested (for a

As Dimitre has said (and I said in my initial reply) if you are in a
situation where downloading a 3rd party extension to the processor is
OK, a better solution would be to use the msxml4 exslt implementation.


<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="set.xsl"?>
<xsl:stylesheet version="1.0"   
extension-element-prefixes="exslt exsltf  msxsl"

<xsl:variable name="x">

<exsltf:function name="msxsl:node-set">
<xsl:param name="x"/>
<exsltf:result select="exslt:node-set($x)"/>

<xsl:template match="/">
[[[<xsl:value-of select="name(msxsl:node-set($x)/*/*[2])"/>]]]



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread