This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: BAST METHOD
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 17 Apr 2002 10:04:55 +0100
- Subject: RE: [xsl] BAST METHOD
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Never use '//'! So the most explicit path is the best:
>
> /document/head/title
>
Yes. Or even /document[1]/head[1]/title[1]; though that's second-guessing
the optimization that the processor does.
Actually with Saxon, assuming there is a single <title> element in the
document, //title will be a lot more expensive than /document/head/title the
first time it is used, but it will be slightly cheaper on the second and
subsequent occasions; but on the other hand, if you are going to use it
repeatedly, it would be better to use a global variable.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list