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

xsl:number and XT

Subject: xsl:number and XT
From: crism@xxxxxxxxxxxxx (Christopher R. Maden)
Date: Thu, 17 Feb 2000 02:29:36 -0800
xsl number count math
I'm not sure if I'm misunderstanding xsl:number or if there's a small bug
in XT (probably the former).

In a template that matches the title of a section (let's call them <title>
and <section>), I'm trying to number the section.

<xsl:number value="position()" level="single" count="title"/>

gives 2.  This is the default; a simple <xsl:number/> is identical.

Since I want to count <section>s, I specified count:

<xsl:number value="position()" level="single" count="section"/>

According to §7.7:

When level="single", it goes up to the first node in the ancestor-or-self
axis that matches the count pattern, and constructs a list of length one
containing one plus the number of preceding siblings of that ancestor that
match the count pattern.

So it should be counting <section>s.  However, it gives a 2 for every
<section>.  If I change level to "multiple", it works, but it looks to me
like XT isn't behaving correctly with the combination of level="single" and
count="some-ancestor".  What am I missing?

-Chris

--
Christopher R. Maden, Solutions Architect
Exemplary Technologies
One Embarcadero Center, Ste. 2405
San Francisco, CA 94111



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.