Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: passing in an element as a parameter to a stylesheet

From: David Carlisle <david-news@---------.-----.--.-->
To: NULL
Date: 8/2/2007 8:36:00 PM

Richard Tobin wrote:
> In article <46b22125@kcnews01>,
> Joseph Kesselman  <keshlam-nospam@c...> wrote:
> 
>>> generate-id($a) = generate-id($b) would do.
> 
>> That's definitely the simplest way to test is-same-node in XSLT 1.0.
> 
> Why is it simpler than "count($a|$b)=1" ?
> 
> I agree it may be simpler to explain.
> 
> I believe that using generate-id() is likely to be much more expensive
> in most processors, but of course this only matters when it's used
> heavily.
> 
> -- Richard
this came up a while ago on xsl-list and someone (Jeni I think) did a 
survey of popular processors and it was about 50-50 which idiom was 
quicker. On saxon at that time count() was a lot faster than using 
generate-id, so Mike changed things so saxon special cases the 
generate-id($a)=generate-id($b) idiom and rewrites it to an internal 
form which just checks same-node without actually computing the unique 
id, ie it uses an internal (for xpath1) operator equivalent to xpath 2's 
is operator. This is of course a lot faster. Though as you say, you need 
to be doing a lot of them before you can really tell the difference.

David


-- 
http://dpcarlisle.blogspot.com


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