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

Re: Obtain depth to create relative path

Subject: Re: Obtain depth to create relative path
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 23 Aug 2006 10:17:26 +0100
make relative path
> Below is what I have so far, but don't know how to get position or
> counter to function on $x.

Please use other lists (such as querytalk) for xquery, I'll ignire the
xquery parts and answer your xpath question 9which is on topic for this
list)

count(ancestor::*)+1 will return the depth that you ask for in the
subject line, starting from the current node. (It fails in your xquery
as you have not got a current node, I think you intend to count fromm $x
which whould be count($x/ancestor::*)+1 but since $x is iterating
through an explict xpath of fixed depth you know the number in advance


Also 
ex:location=&quot;/home/sj/data/file1&quot;
is a syntax error you want
ex:location="/home/sj/data/file1"


David

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.