Forming the union of two sets that you know to be disjoint is likely to
involve unnecessary sorting and de-duplication operations. Better to use
count(preceding-sibling::*) + count(following-sibling::*)
or why not count(../*)-1
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Karl Stubsjoen [mailto:karl(_at_)meetscoresonline(_dot_)com]
Sent: 15 December 2004 17:47
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Best way to count siblings
Is this the best way to count siblings?
<xsl:value-of select="count(preceding-sibling::* |
following-sibling::*)"/>
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--