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

Streamlining XSL and transform performance (how does i

Subject: Streamlining XSL and transform performance (how does it actually work?)
From: Julian Voelcker <asp@xxxxxxx>
Date: Fri, 19 Mar 2004 10:00:07 GMT
xml transform performance
I am trying to do a sort of mail merge for creating wills and have been 
advised that an XSL transform is the best route to go down.

The data is in XML format and I am just starting to convert the massive 
(200+ pages) html template into an XSLT document.

The XML data is formatted as follows:
<AnswerSet title = "Test File">
  <Answer name = "ABGRbefore">
    <RptValue>
      <TFValue>true</TFValue>
      <TFValue>false</TFValue>
      <TFValue>false</TFValue>
    </RptValue>
  </Answer>
  <Answer name = "Female">
    <TFValue>false</TFValue>
  </Answer>
  <Answer name = "ticdesc">
    <TextValue>my collection of teapots</TextValue>
  </Answer>
</AnswerSet>

There are around 3,000 elements in the XML file in total.

I have so far worked out that at a simplistic level I can use the 
following XSL for extracting the data:
<xsl:for-each select="AnswerSet/Answer[@name='Female']">
    <xsl:if test="TFValue = 'true'">
     <p>the user is female.</p>
    </xsl:if>
    <xsl:if test="TFValue = 'false'">
     <p>the user is male.</p>
    </xsl:if>
</xsl:for-each>
<xsl:for-each select="AnswerSet/Answer[@name='ticdesc']">
  <p><xsl:value-of select="TextValue"/></p>
</xsl:for-each>

Is this the most efficient way of extracting the data?

Each time I want to extract a value, is the Processor having to loop 
through the XML file or does it do it in a single pass?

I could break the template down into more manageable chunks, but am not 
sue how to import one template into another.

Before I embark on a massive conversion process, I'm just wondering if 
I am going down the right route.

Any pointers would be appreciated.
-- 
Cheers,

Julian Voelcker
United Kingdom



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.