Subject: RE: [xsl] converting xsl-wd to xsl1, msxml script changes From: Woody <woody@xxxxxxxxxxxxxx> Date: Thu, 13 Feb 2003 23:11:00 +0000 |
From: "bryan" <bry@xxxxxxxxxx>
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; oDom.load(xmlnodes); return oDom; } </msxsl:script>
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.
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"
<level1> <level2> <level3>blah</level3> <level2 id="3"/> <level2> hello <level3 name="wobble"/> <level2>hello again<level2> </level1>
<xsl:template match="/level2"> <xsl:value-of select="msxsl:test(.)"/> </xsl:template>
function test(node) { if(node.length > 0 && node.type != "object") // TIME TO PARTY }
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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] converting xsl-wd to xsl1, Woody | Thread | RE: [xsl] converting xsl-wd to xsl1, bryan |
Re: [xsl] XMLNS and XSL, David N Bertoni/Camb | Date | RE: [xsl] converting xsl-wd to xsl1, David Carlisle |
Month |