RE: [xsl] converting xsl-wd to xsl1, msxml script changes

Subject: RE: [xsl] converting xsl-wd to xsl1, msxml script changes
From: "bryan" <bry@xxxxxxxxxx>
Date: Thu, 13 Feb 2003 09:53:58 +0100
>I am calling it with <xsl:value-of select="msxml:transform('.')"/>

>and I am trying to get the node set of the object - I don't know what 
>it is I am getting and I am having difficulty finding it out. (I have 
>also tried sending it different things, putting it in a variable, 
>putting msxsl:node-set.. etc)

here's an example that works for me of getting a node-set with an
extension function;

<msxsl:script language="JScript" implements-prefix="test">
   function test(value){ 
var oDom;
var xmlnodes;
oDom=new ActiveXObject("msxml2.domdocument.4.0");
 xmlnodes = value;
      return oDom;

<xsl:template match="/">
<xsl:apply-templates select="msxsl:node-set(test:test('funcs.xsl'))"
<!--so you would write in a name of an xslt, this is in effect the same
as the document function-->

<xsl:template match="/" mode="test">

<xsl:template match="xsl:template">
Template number:<xsl:number/> <xsl:value-of select="@match"/>

>>A propos the javascript for speed I think Dimitre Novatchev showed
>>the javascript was in fact slower in his implementation of a random
>>number generator for his fxsl project, although this may be just my
>>memory playing tricks on me.

>I don't know, I am new at this but I do know there is a comment in 
>the file from a few years ago which says the xsl version was replaced 
>by the javascript version for a 7 times speed increase, and there is 
>timing code in there. maybe it is different now but my concern is 
>that I have many of these files that I want to convert and they all 
>have the same node passing problem.

Well a 7 times speed increase can be caused by lots of things, in my
experience by bad xslt - which I guess would comprise any wd-xsl :)
Not that that's a hit on whoever wrote it first - with my luck it would
turn out to be one of my early efforts. 

>>It might be good to say what these
>>functions do and take it from there.

>The structure of large parts of the xml is similar to parts of the 
>html so it does a regular expresion searchand replace and writes it 
>out as a string.
>hopefully I won't have to touch that bit.. me and regular expressions 
>never got on

I was thinking more along the lines of, a description of what one wants
to do with examples etc. and it could be that various people on this
list would say - "do this instead"

Again it is difficult to give suggestions without examples, if there is
something in these files that is proprietary than make an abstract case
and example that requires the same handling.

 XSL-List info and archive:

Current Thread