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

Re: Getting variable yet most immediate parentNode

Subject: Re: Getting variable yet most immediate parentNode
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 28 Sep 2007 19:40:23 +0200
Re:  Getting variable yet most immediate parentNode
Steve wrote:

I think we've gone awry. .//answer's doesn't make sense because, as Wendell pointed out, I want to go up the tree if there is no child <answers />. I tried his syntax, however I'm not sure how to make it choose a child answer's node before it goes looking for the closest ancestral answer node (without using those pesky case statements).

I added the .// in my proposed solution because I inversed your logic (i.e., I started the match from the parent of the answer nodes and applied the answer nodes from there with .//). But, like you said yourself already, the source you showed, both in XSLT and in XML contained errors and that may have made me make the wrong assumptions about what structure is and what structure is not possible (or effective).


But I saw that Wendell's solution "up the tree" works just fine, which is nice to hear :)

About understanding what you are after: I've looked through the thread but still haven't seen a clean output that you have now (so we can mimic your current stylesheet) and the output that you are after, so it is just guessing at what you really want with your code. Or have you found the correct solution already?

Cheers,
-- Abel Braaksma

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.