Subject: Re: [xsl] alternative to repeatedly walking the ancestor axis in 1.0 From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 04 Aug 2008 12:09:32 -0400 |
> I submit that speculating on performance differences vs alternatives is > somewhat pointless, since it will depend on the implementation. It's not > that it couldn't be optimized (especially if it were supported in the > parser), so much as that it might not be.
In that case Wendell, there's no need to discourage anyone from using //
Just to recap:
- in 1.0 you don't have tunnelled parameters so you either pass the information explicitly through each template which is prone to error (and bad for your sanity), or you get it from the ancestor axis, which could be expensive (and also isn't what you'd call elegant)
- there is xml:lang and the lang() function, which were invented for this particular task, but many implementations (including Saxon) will just walk the ancestor axis behind the scenes, so you don't benefit from switching to xml:lang from a proprietary solution
This really isn't about premature optimisation...
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] alternative to repeatedly, Andrew Welch | Thread | Re: [xsl] alternative to repeatedly, Vladimir Nesterovsky |
RE: [xsl] Using "except" with node , Michael Kay | Date | [xsl] node functions, Sarkup Sarkup |
Month |