xsl-list
[Top] [All Lists]

Re: [xsl] RE: Finding the closest preceding element within the containing block

2012-05-27 16:20:41
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(_at_)wabtec(_dot_)com> 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.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
Vasu Chakkera
NodeLogic Limited
Oxford
www.node-logic.com
==============

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>