Subject: Re: [xsl] speed difference between IE and Firefox during transform? From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Tue, 01 Mar 2005 20:06:15 +0100 |
The stylesheet, at the point of the slowness, has 2 node-set variables, and it is building a 3rd variable by selecting all the members of the first set that have an attribute that is found in some member of the second set. That block of code looks a little like this:
<xsl:variable name = "revealing" select = "$field[
@isBomb != -1 and @isRevealed = 0 and
((concat(@h -1 ,'/', @v ) = $zeros/@sqID) or (concat(@h +1 ,'/', @v ) = $zeros/@sqID)
)] " />
The predicate could then be reduced to this: <xsl:variable name = "revealing" select = "$field[ @isBomb != -1 and @isRevealed = 0 and $zeros/@sqID=key('zero',concat(@h ,'/', @v ))/@sqID] " />
<xsl:key name="zero" match="square" use="concat(@h -1 ,'/', @v )"/> <xsl:key name="zero" match="square" use="concat(@h +1 ,'/', @v )"/> <xsl:key name="zero" match="square" use="concat(@h -1 ,'/', @v -1)"/> ...
regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) "Et ipsa scientia potestas est" - Francis Bacon , Meditationes sacrae
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] speed difference between IE a, Sean Whalen | Thread | Re: [xsl] speed difference between , António Mota |
[xsl] Problem with encoding using d, António Mota | Date | RE: [xsl] Triming in XSLT, Tham Tinh |
Month |