|
[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?
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








