[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Path from RNG to Instance - hooray
Subject: Re: [xsl] Path from RNG to Instance - hooray From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 26 Mar 2003 13:50:13 GMT |
> First, I used a for-each > select=document('inst.xml') because you're not allowed to do ... well, > I had the document in a variable actually and you can't do > $variable/$var2 ... grr! document("inst.xml")/a/b/c is a valid Xpath so presumably as an alternative to using for-each you could just have built such a string to pass to evaluate, something like test="not(dyn:evaluate(concat('document("inst.xml")', $instPathStr, '/*'))"> (untested) A more portable alternative would be to directly navigate the tree based on the names of your ancestor elements rather than to build these names into a string which you then have to evaluate as an xpath using an extension function, basically you'd just want a recursive named template with two parameters, param1, a node in the instance doc (starting with /) and param2 a set name attributes coming from the RNG (initially ancestor-or-self::*/@name) then the recursive template just needs to look for children of param1 with name given by the first node in param2, and if it finds any, call itself with param1 being the child node and param2 being all nodes except the first node in param2. (also untested:-) 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 ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Path from RNG to Instance - h, S Woodside | Thread | [xsl] xsl:message terminate="yes", S Woodside |
Re: [xsl] Ampersand problem, Simon Kelly | Date | [xsl] sum() function, David Alcantara |
Month |
Keywords