Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] alternative to repeatedly walking the ancestor axis in 1.0

From: Wendell Piez <wapiez@---------------->
To:
Date: 8/4/2008 7:33:00 PM
At 11:08 AM 8/4/2008, Andrew wrote:
> 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 //

Indeed there isn't. :-)



Which is not to say that the battle-scarred veteran can't say "oh you 
know, that's likely to be expensive, and we've learned to work around 
potential problems with it in advance", etc.



I think we should be moderate in everything, which includes allowing 
for a certain amount of excess.



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)

-- or you write a SAX filter that annotates the input tree and makes 
it really really fast ... elegance being in the eye of the beholder ...



- 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

-- as far as performance goes, while allowing that there may or may 
not be other costs and benefits related to using a standard mechanism 
in your particular situation ...



This really isn't about premature optimisation...

Fair enough.



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
======================================================================


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent