[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl:number and conditional

Subject: RE: xsl:number and conditional
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 31 May 2005 16:42:51 +0100
mike counds
> If I understand right, this, in the context of a function:
> 
> <xsl:number level="any" select="$footcite"
>           
> count="db:footnote|db:citation[not($footcite/ancestor::db:foot
> note)]"/>
> 
> ... should not be counting db:citation elements which are descendents
> of db:footnote.
> 
> Is that right?

Not quite. There are two cases:

if $footcite has an ancestor that is a db:footnote, then it counts all
db:footnote elements

otherwise, it counds all db:footnote and db:citation elements

> 
> My problem is that where I have a db:citation as child of db:footnote,
> I end up with a list numbered liike:
> 
> 1
> 2
> 4
> 5
> 
> ... where the gap (numbered '3' but not output) is the
> db:footnote/db:citation element.

Perhaps the pattern you want is:

count="db:footnote | db:citation[not(ancestor::db:footnote)]"

(but it's hard to tell without more detail).

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


> 
> Bruce

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.