Hi all, I have an XML file similar in layout to the sample below and I would like to print the value of the elements id parameter.
I've raked around the Internet and can't find anything; either that or it's so obvious I'm missing it. I'm using XSLT to transform the the XML to XHTML using templates.
If I use:
<xsl:value-of select="Name[@id]"/>
Inside my match="Unit" template I get 'Value goes here...' as the output! Not what I'd expected.
Can anyone please point me in the right direction here please.
--
Woogoo
Code:
<System>
<Unit>
<Name id='TZ-1'>Value goes here...</Name>
<Desc id='TZ-2'>Value goes here...</Desc>
...
</Unit>
<Plant>
<Rating id='PI-1'>Value goes here...</Rating>
...
</Plant>
</System>
I've raked around the Internet and can't find anything; either that or it's so obvious I'm missing it. I'm using XSLT to transform the the XML to XHTML using templates.
If I use:
<xsl:value-of select="Name[@id]"/>
Inside my match="Unit" template I get 'Value goes here...' as the output! Not what I'd expected.
Can anyone please point me in the right direction here please.
--
Woogoo