[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

Subject: Re: RE: Finding the closest preceding element within the containing block
From: Vasu Chakkera <vasucv@xxxxxxxxx>
Date: Sun, 27 May 2012 22:20:26 +0100
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
==============

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.