On 30/11/2010 17:19, Christian Roth wrote:
I'm so glad I included the "Is this a correct..." part in my original post :-/
New try, thanks to the great replies from Lars and David:
count(
ancestor-or-self::A[ .>> current()/ancestor::node()[self::B or
self::document-node()][1] ]
)
Am I getting closer with this...?
I'm not sure but I think you want to count the number of A ancestors
stopping at the first B ancestor if there is one, so i think I'd write
that as
ancestor-or-self::A except ancestor::B/ancestor::A
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--~------------------------------------------------------------------
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>
--~--