Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XSL really slow please help [Thread Next] Re: XSL really slow please helpTo: NULL Date: 3/13/2009 8:19:00 AM I agree with Neil on the size of data but can you try a different processor, Net 1.1 was much slower than 2.0 and both can be slower than Saxon (not sure if it's practical to run an older version of Saxon in 1.1 though)? Also if you're adding a new export type what's the difference between writing a function that transforms via XSLT and one that uses an Xml Reader? -- Joe Fawcett (MVP - XML) http://joe.fawcett.name "dba" <bryanmurtha@g...> wrote in message news:1c02dd4e-e79b-4a87-bf6c-afd3893b3f86@v...... > I appreciate the advise, but it's a .NET 1.1 app I'm maintaining. I > can't re-write it in the time constraints I have, I just need to add > in a new export type. What strikes me as strange is that we have other > style sheets that produce tab delimited text, or csv, with the same > amount of data but don't have the performance issues of this xsl. > > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0"> > <xsl:output method="text" indent="no"/> > <xsl:variable name="delimiter" select="' '"/> > <xsl:variable name="delimiterReplacement" select="' '"/> > <xsl:variable name="poundsign" select="'_x0023_'"/> > <xsl:variable name="EOL" select="' > '"/> > > <xsl:template match="/"> > <xsl:for-each select="/*/*[position()=1]"> > <xsl:for-each select="*"> > <xsl:choose> > <xsl:when test="contains(name(.), $poundsign)"> > <xsl:value-of select="concat(substring-before(translate(name(.), > $poundsign, '#'), '##'), '#', substring-after(translate(name(.), > $poundsign, '#'), '##'))"/> > </xsl:when> > <xsl:otherwise> > <xsl:value-of select="name(.)"/> > </xsl:otherwise> > </xsl:choose> > <xsl:if test="not(position() = last())"> > <xsl:value-of select="$delimiter"/> > </xsl:if> > </xsl:for-each> > </xsl:for-each> > <xsl:value-of select="$EOL"/> > <xsl:for-each select="/*/*"> > <xsl:for-each select="*"> > <xsl:value-of select="translate(translate(., $EOL, ' '), > $delimiter, $delimiterReplacement)"/> > <xsl:if test="not(position() = last())"> > <xsl:value-of select="$delimiter"/> > </xsl:if> > </xsl:for-each> > <xsl:value-of select="$EOL"/> > </xsl:for-each> > </xsl:template> > </xsl:stylesheet> > > I'm just trying to figure out how to do something similiar but with a > different target format. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
