[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:number and conditional
Bruce,
Did you try Michael's latest suggestion of count="db:footnote|db:citation[not(ancestor::db:footnote)]" ? My current reading (though I confess your problem is complex enough that I'm not absolutely confident after a cursory glance) is that this should work. I might have suggested the other expression in an effort to account for the fact that XSLT 2.0 functions do not "carry their context" the way named templates do ... but that would be mistaken in this case, as the 'count' attribute takes a pattern to be matched, not an arbitrary XPath expression (as a 'select' attribute does). The expression above should provide for consecutive numbering of all footnotes with all citations not themselves in footnotes, which is what you want, isn't it? (Not either all footnotes only, or footnotes mixed with citations, depending on whether the context node -- footnote or citation -- itself has a footnote ancestor.) Cheers, Wendell At 12:03 PM 5/31/2005, you wrote: On 5/31/05, Michael Kay <mike@xxxxxxxxxxxx> wrote: > > 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 ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|