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

RE: correct use of keys?

Subject: RE: correct use of keys?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2001 14:55:45 +0100
correct use of miss
> I have a stylesheet which, when run on a 10MB doc turns it into a 30MB
> doc in ~600 seconds.
>
> Even for such a large doc, this seems like along time given my machine
> is a 1.33GHz Athlon, 256MB.
>
It seems a long time to me, too. Which processor are you using? Are you
getting thrashing due to shortage of memory? If it takes this long on Saxon,
then I'm interested to find out why.

The repeated use of "node()[contains(name(), 'field')]" isn't particularly
nice. It suggests poor design of the XML document if the fact that an
element name contains a particular substring is so significant. You might be
better off doing a preprocess of the document in which elements whose name
contains 'field' are given an extra attribute, field="yes", and then use
this attribute in the second phase. In any case, I suspect that you are not
interested in all nodes whose name contains 'field', but only in elements
whose name contains 'field'. Replacing "node()" by "*" will speed things up
a bit.

And incidentally, you never need to specify "//" at the start of a match
pattern.

Mike 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.