|
Subject: [xsl] how to get position() From: Vinoth Palaniappan <vinoth@xxxxxxxxxxxx> Date: Fri, 2 Aug 2002 18:15:17 +0530 |
Hi,
My problem is as follows:
I've a DTD: <!ELEMENT filterable_body_data (nv_pair*)> and the corresponding
xml document is:
<filterable_body_data>
<nv_pair/>
<nv_pair/>
</filterable_body_data>
I've an XSL document for transferring this xml to a C++ header file. The XSL
file snippet is:
<xsl:template match="filterable_body_data">
fill_filterable_body()
{
<xsl:for-each select="child::*">
<xsl:apply-templates
select="."></xsl:apply-templates>
</xsl:for-each>
}
<xsl:template match="nv_pair">
<xsl:number level="single" count="nv_pair" from="nv_pair"/>
</xsl:template>
The "<xsl:number level="single" count="nv_pair" from="nv_pair"/>" in the
template match="nv_pair", I get a count sequentially from one(like 1,2,3..).
I would like to have count from zero(like 0,1,2..). I added
attribute-format="0" to the <xsl:number..> element and still the count is
done from one and not from zero.
Can you tell me how to do count of elements from zero. Thank you in
advance!
____________________________________________________________________________
___________
Vinoth
iDEN OMC Software, GSG
Motorola, India
voice: 91-040-3308090 extn:3208
____________________________________________________________________________
___________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] or condition, Wendell Piez | Thread | RE: [xsl] how to get position(), DPawson |
| RE: [xsl] sliding window of depth 2, Américo Albuquerque | Date | [xsl] Table of contents, Jan Zavoral |
| Month |