RE: [xsl] XSL copy-of problem with extraction of a node based on child element

Subject: RE: [xsl] XSL copy-of problem with extraction of a node based on child element
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Thu, 20 Jan 2005 09:37:33 +0200
Hi,

> I wish to extract one subnode from an XML file based on the
> value of a child
> element in the node. In this case a complete copy of a
> property node based
> on the value of the index element. My efforts so far have
> either resulted in
> the index element only or the entire XML file.

snip

> <xsl:copy-of select="contents/property/index[. = '003000001']"/>

Almost there, use

contents/property[index = '003000001']

Cheers,

Jarno

Current Thread