|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: counting specific nodes
Subject: Re: counting specific nodes
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Wed, 15 Oct 2003 15:57:29 +0200
|
james walker wrote:
given the xml
<vs>
<ve pos="1"></ve>
<ve pos="1.1"></ve>
[snip]
and given that i am starting on a node with pos=1 (or 2 or 3....), how
do i count the nodes which have position with 3 dots only (e.g.
pos=1.1.2.1?) and start with the current node position. I came up with
something like this:
<xsl:variable name="rowspan" select="count(ve[starts-with(@position,
current()/@position) and contains(...........)])" />
e.g. for position 1, it should be 4 (1.1.1.1 , 1.1.1.2, 1.1.1.3, 1.2.1.1)
If there are only digits beside the dots in the pos string, try
string-length(translate(@pos,'1234567890',''))=3
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|