Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


getting parent node using XLST

From: "john smith" <princetonharvard@-------.--->
To: NULL
Date: 5/2/2005 6:32:00 PM
Hello,

I am having trouble getting the parent node of an xml document using xslt.

I am trying to return the node wine, but this does not return wine but the
element values under wine.
I thouht this would work.  I am looking for the prices context and then ask
for the parent node right?

What am I doing wrong?  Thanks in advance for your help.


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">

<xsl:template match="prices">

parent is: <xsl:value-of select="parent::node"/>

</xsl:template>

</xsl:stylesheet>



<wine>
   <winery>Los Vascos</winery>
   <year>1998</year>
   <prices>
      <list>13.99</list>
      <discounted>11.99</discounted>
      <case>143.50</case>
   </prices>
</wine>






transparent
Print
Mail
Like It
Disclaimer
.

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 www.altova.com/list/index.html. 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.

.
.

transparent

transparent