|
Loading...
|
xsl-list@lists.mulberrytech.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: [xsl] XPath preceding Wendell Piez Mon Apr 09 09:00:35 2012
Hi Rick, On 4/9/2012 11:09 AM, Rick Quatro wrote:
Hello, I am trying to find a particular element that is anywhere before the current element like this: preceding::case-cite This works if the two elements have the same parent, but I want to match an element anywhere before the current element. For example, if the context is the<case-cite-2nd> element, I want to find a<case-cite> element anywhere in the structure previous to the<case-cite-2nd> element.
preceding::case-cite will do this.preceding-sibling::case-cite will limit the traversal to siblings of the context node.
If the preceding:: axis isn't working for you, please show us more code. Cheers, Wendell
<root>
<section>
<para>
<case-cite/>
</para>
<para>
<case-cite-2nd/>
</para>
</section>
</root>
Thanks in advance.
-- ====================================================================== Wendell Piez mailto:[EMAIL PROTECTED] Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== --~------------------------------------------------------------------ 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:[EMAIL PROTECTED]> --~--
- [xsl] XPath preceding Rick Quatro 2012/04/09
- Re: [xsl] XPath preceding Wendell Piez 2012/04/09 <=
- Re: [xsl] XPath preceding Michael Müller-Hillebrand 2012/04/09
- RE: [xsl] XPath preceding Rick Quatro 2012/04/09