[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: Finding the closest preceding element within t
Hi Mike, Preceding-sibling allways brings you the sibling under the same parent. So you will never get a "C" element from a different B parent. But sometimes there could be a situation where you are having to use preceding as opposed to the preceding-sibling, then there is a chance that you may go out into other parents.. in those cases, if you want to make sure that the two nodes that you are selecting have a common ancestor node, then you could use key() function, with the third parameter of the key ( xslt 2 ) as the common ancestor.( the third parameter of the key in xslt 2 gives the context under which the key is being evaluated).. Hope this helped Vasu On 21 May 2012 19:20, <mlcook@xxxxxxxxxx> wrote: > Thanks for the response (also suggested by Syd Bauman) and follow-up emails from Michele Combs to refine the test on a more complex document structure. > > With my other document variation, I ended up also using ../preceding-sibling to look into previous "b" elements. > > I've started going through the tutorial suggested by ihe onwuka. > > Thanks again for this help and all the previous info I've gleaned from the postings. > > --Mike Cook > > > This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original. > -- Vasu Chakkera NodeLogic Limited Oxford www.node-logic.com ==============
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|