Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - getting parent node using XLST [Thread Next] Re: getting parent node using XLSTTo: NULL Date: 5/2/2005 9:48:00 PM john smith (princetonharvard@c...) wrote:
: 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"/>
select=".."
: </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>
--
This space not for rent.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
