xsl-list
[Top] [All Lists]

RE: Restricting the scope of preceding:: and following::

2006-01-04 03:52:05
... count(ancestor::s[1]|$sentence)=1 

I've always 
preferred the variant: generate-id(ancestor::s[1]) = 
generate-id($sentence). That should give better 
results..

Jeni Tennison once did some performance tests and found that some processors
gave better results for count(a|b)=1, others for
generate-id(a)=generate-id(b).  IIRC, she found that generate-id() was much
slower on Saxon, but faster on other processors. It may have changed in the
meantime, of course.

In XSLT 2.0 you can say what you mean, and write "a is b".

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--