xsl-list
[Top] [All Lists]

Re: [xsl] bad programming for speedup?

2007-07-24 03:13:51
On 7/24/07, christoph(_dot_)naber(_at_)daimlerchrysler(_dot_)com
The aim is to surround occurences of <row> - tags with a <table> - tag.
I've done this with "good" XSL, what appears to be real slow, and with a
"bad" version, which inserts tags as <xsl:text>.

You didn't show your "good" version, but the standard approach here
would be the identity template with a specific template for the <row>
element (not tag!)

<xsl:template match="@*|node()">
 <xsl:copy>
   <xsl:apply-templates select="@*|node()"/>
 </
</

<xsl:template match="row">
 <table>
   <xsl:apply-templates/>
 </table>
</

I'm pretty confident that would be faster (or at least just-as-fast)
as your current fastest solution.

(your "bad" version is really common amongst casual XSLT'ers when they
get stuck, by the way)

--
http://andrewjwelch.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--