Subject: Re: [xsl] A question on optimization From: Jochen Wiedmann <jochen.wiedmann@xxxxxxxxxx> Date: Tue, 02 Nov 2004 15:40:54 +0100 |
an xslt stylesheet is an xml document so you can transform it using various methods, not least another xslt stylesheet. The details depend on which API you are using.
It's unlikely to make any real difference on performace though. Time is far more likely to be spent on navigating the tree as a whole rather than on the fine details of the instructions used to generate a small local result fragment.
<xsl:for-each select="//justus:choice"> <xsl:element name="TR"> <xsl:variable name="current" select="."/> <xsl:for-each select="//justus:part[@visible='true']"> <xsl:variable name="dbfeld" select="."/> <xsl:element name="td"> <xsl:for-each select="$current/@*[name()=$dbfeld/@dbfeld]"> <xsl:value-of select="."/> </xsl:for-each> </xsl:element> </xsl:for-each> </xsl:element> </xsl:for-each>
<xsl:for-each select="//justus:choice"> <xsl:element name="tr"> <xsl:element name="td"><xsl:value-of select="a1"/></xsl:element> <xsl:element name="td"><xsl:value-of select="a2"/></xsl:element> ... </xsl:element> </xsl:for-each>
-- http://lilypie.com/baby1/050423/1/5/1/+1
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] A question on optimizatio, David Carlisle | Thread | Re: [xsl] A question on optimizatio, David Carlisle |
Re: [xsl] A question on optimizatio, David Carlisle | Date | Re: [xsl] A question on optimizatio, David Carlisle |
Month |