Altova Mailing List Archives

[xsl] Need for a technique

From: Paul Terray <terray@------------>
Date: 2/13/2001 2:28:00 AM
Hi everyone,

I need a simple XPath request to look for the following thing :

have the first enclosing element of an element that correspond to certain 

For example :
<para>my text is here, and <x/> I need to know where x is...</para>
<para>However :<list>
<item><x/> this element could be anywhere</item>

In this example, I am looking for the nearest enclosing <hx> element (h1 or 

I need an Xpath expression that would give back h1 for the first <x/> 
element, and h2 for the second.

Any idea ?



Paul TERRAY - Ing&eacute;nieur Syst&egrave;mes Documentaires


Centre d'affaires - 22, rue Etienne de Jouy

78353 Jouy en Josas CEDEX

Tel. 01 34 58 70 70 - Fax. 01 39 46 06 90

email : terray@xxxxxxxxxxxx 

XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.