[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

A question on optimization

Subject: A question on optimization
From: Jochen Wiedmann <jochen.wiedmann@xxxxxxxxxx>
Date: Tue, 02 Nov 2004 14:28:43 +0100
xsl optimization
Hi,

I have a stylesheet, which processes a *very* large XML document. Basically, the XML document contains a header, which specifies a lot of "columns" (say "a1", "a2", "a3", ..., except, that the names are dynamic). Following that, the stylesheet creates a HTML "table" tag and iterates over the remaining contents of the XML document. For any "row" (some 10000), it creates a "tr" tag similar to the following:

    <xsl:element name="td"><xsl:
      <xsl:attribute name="a1"><xsl:value-of select="@a1"/>
      </xsl:attribute>
      <xsl:attribute name="a2"><xsl:value-of select="@a2"/>
      </xsl:attribute>
      <xsl:attribute name="a3"><xsl:value-of select="@a3"/>
      </xsl:attribute>
    </xsl:element>

The above code works fast. However, due to the dynamic specification of the column names, I have several cascading loops, which seem to slow down the processing seriously.

Do you have any suggestions, how to implement the above very fast? For example, is it possible, to create or modify a template at runtime? Is it possible to at least read the attribute names into some kind of array and iterate over the arrray elements? Or, anything else, ...


Regards,


Jochen


-- http://lilypie.com/baby1/050423/1/5/1/+1

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.