xsl-list
[Top] [All Lists]

Re: Problem in Preceding node.

2005-10-03 05:20:25
Hi Aaron,

On 10/3/05, aaron apigo <aaronjose_apigo2001(_at_)yahoo(_dot_)com> wrote:
Hi All,
  Got another question regarding the preceding node.

This will be a little easier if you are able to get an input like:
<c lv="1">Level 1</c>
...
<c lv="2">Level 2</c>

As it is now, you will have to parse the text in the c node.
substring(c,7,1 div 0) <!-- 1 div 0 to ensure you get all levels, but
1 or 2 might do -->

With current element being processed being c:
preceding::c[substring(c,7,1 div 0)&lt;substring(current(),7,1 div 0)]

For your label, you will probably need the count function as well.
count(preceding::c[substring(c,7,1 div 0)=substring(current(),7,1 div 0)

For the current number. You will also need something for how many "."
you need in your label.

I do not know whether this is what you want.

Regards,
Ragulf Pickaxe...

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>