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

RE: How should I structure a huge XSLT dataset best?

Subject: RE: How should I structure a huge XSLT dataset best?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 29 Sep 2003 23:16:01 +0100
xslt dataset to xml
> The XML data that I will be 
> processing is usually less than 1K.
> 
> My first reaction, without any planning, is to create an XML 
> that is easily indexed to pick out the status of each 
> telephone number.  For example, if 41057 had a treatment code 
> of 5, I would first lookup 410, then 4105, then 41057, then 
> 410571.  The 410571 would not be found, so I would fall back 
> tothe 41057 answer.  

My first attempt would be to keep the data file separate from the
stylesheet, and to index the phone numbers using:

<xsl:key name="k" select="substring(.,1,3)"/>
<xsl:key name="k" select="substring(.,1,4)"/>
<xsl:key name="k" select="substring(.,1,5)"/>
<xsl:key name="k" select="substring(.,1,6)"/>

Then just do a simple lookup using key('k', $param).

Michael Kay


 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.