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

Re: extract xpath locator

Subject: Re: extract xpath locator
From: Nicolas Mazziotta <nicolas.mazziotta@xxxxxxxxx>
Date: Thu, 12 Aug 2004 13:40:30 +0200
extract xpath
I works!
Thanks a lot for the fast answer.
Sorry it was in the archive.

N. Mazziotta

On Thu, 12 Aug 2004 10:25:27 +0100
David Carlisle <davidc@xxxxxxxxx> wrote:

> 
> The archives of this list (and possibly the faq) have a very complete
> implementation of this from Dimitre if I recall that handles all kinds
> of nodes, comments text etc, but basically you want to use
> [<xsl:value-of
> select="1+count($node/preceding-sibling::*[local-name(.)=local-name($node)
>                                    and namespace-uri(.)= and namespace-uri($node)])"/>]
> 
> or simpler don't write out 
> <xsl:value-of select="name($node)">
> just write out a *
> then you can do
> [<xsl:value-of
> select="1+count($node/preceding-sibling::*)"/>]
> 
> ie produce
> 
> /*[1]/*[2]
> 
> rather than
> "/doc/i[2]".
> 
> 
> > I have tried to "count(preceding-sibling::$name)"
> 
> You can never use a variable to hold a bit of Xpath syntax, this would
> be like having x="+ 2" in C and hoping that 1 x was a) legal and b)
> evaluated to  3. Variables can only be bound to values.
> 
> David
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

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.