[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
On 30/11/2010 17:19, Christian Roth wrote:
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
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________
Re: [xsl] Count elements A up to any element B in an axis
Subject: Re: [xsl] Count elements A up to any element B in an axis From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 30 Nov 2010 17:25:35 +0000 |
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. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Count elements A up to an, Christian Roth | Thread | [xsl] Catch output of XSL identity , becarios mx |
Re: [xsl] Count elements A up to an, David Carlisle | Date | [xsl] Catch output of XSL identity , becarios mx |
Month |