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

Re: Problem in Preceding node.

Subject: Re: Problem in Preceding node.
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Wed, 5 Oct 2005 21:02:27 +0200
preceding node xsl
Hi Aaron,

> i got the problem looking at the level, for example in
> the node that has a comment
> <!---- comment  -->
> i have to check the preceding <a> if it has an element
> <a> below him, if none consider it as level 2 (?.1)
> but i do not know what should be in the (?), because i
> have to check all the preceding <a> that do not have
> element <a> below him then count it. maybe the
> attribute may help, but i do not know how to do it.
> hope you understand my point.

I have now tried to look at your question three times, and I must say
that I have absolutely no idea what you are asking about.

I would guess that what you need is something like
"count(ancestor::a)" or (after rereading the question yet again)
"count((ancestor::a)[1]/preceding-sibling::a[not(a)])" but this one
will take too many a nodes. You will in this case have to make a
variable: <xsl:variable name="This" select="(ancestor::a)[1]"/>
Then you will need the predicate
[generate-id(following-sibling::a[a])=generate-id($This)]. But there
might be some easier way to achieve this. And I am still totaly unsure
about what you are asking...

Regards,
Ragulf Pickaxe :-)

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.