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

xsl:number usage - trying to generate multiple numbere

Subject: xsl:number usage - trying to generate multiple numbered lists for different sub-trees
From: James Abley <james.abley@xxxxxxxxx>
Date: Mon, 18 Oct 2010 13:33:03 +0100
 xsl:number usage - trying to generate multiple numbere
Hi,

I'm trying to generate numbered links from my source document. The
transform is using <xsl:result-document/> to generate multiple output
documents from a single input document.
For each output document, I have a requirement to generate numbered
links. I think I need to use the from attribute of <xsl:number/>, but
I haven't managed to get it working.

My cut-down example is here:

http://gist.github.com/632088

Running this and looking at the generated diagnosis.html shows me that
link numbering in that file starts from 2, rather than the desired 1.
I believe is because the /article/body/symptoms/sec/p[1] element
contains an xref[@ref-type='bibr' and @rid] element.

So my thinking was that I need to specify a from attribute on the
<xsl:number/> element that matches the ancestor element which is a
child of the body element. Alternatively, I want the child of the body
element which is an ancestor of the context node.

Unfortunately, I do not seem to be able to do that; specifying the
ancestor axis in the from attribute causes an error, so I'm a little
stuck.B I can't just specify from="diagnosis" since then it won't work
for when I come to write the templates to generate the symptoms output
document. I am going to try explicitly listing the possible matches
for the from attribute; i.e. from="diagnosis | symptoms" but I don't
understand the ramifications of this fully.

Please could someone nudge me in the right direction?

Cheers,

James

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.