This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

xsl:number and XT


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]