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

Re: nearly FAQ .. (numbering of elements)

Subject: Re: nearly FAQ .. (numbering of elements)
From: Christian Beutenmueller <beutenmueller@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Jan 2004 16:58:28 +0100
faq numbering
Andrew Welch schrieb:

Ok here is my Problem:
I have an xml file, which looks like that:
<my-foo>
	<text1></text1>
	
	<question>[..]</question>
	<question>[..]</question>
</my-foo>

Now I need in my output (an xsl:fo with some special extensions) something like:

Q1 [..]
Q2 [..]


What about:

<xsl:text/>Q<xsl:number/>

Or:

<xsl:value-of select="concat('Q',count(preceding-sibling::question))"/>
Thats an really elegant solution. And with a +1 it does exactly what I want.
Thanks.


Christian
--

"A truly outstanding programmer can find bugs
buried in a 6 megabyte core dump without using a hex calculator"
[http://www.pbm.com/~lindahl/real.programmers.html]


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.