I have a xml file like this
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="file:/dev/null" iosp="lasp.tss.iosp.ValueGeneratorIOSP" start="0" increment="1">
<attribute name="title" value="Vector time series"/>
<dimension name="time" length="100"/>
<variable name="time" shape="time" type="double">
<attribute name="units" type="String" value="seconds since 1970-01-01T00:00"/>
</variable>
<group name="Vector" tsdsType="Structure" shape="time">
<variable name="x" shape="time" type="double"/>
<variable name="y" shape="time" type="double"/>
<variable name="z" shape="time" type="double"/>
</group>
</netcdf>
And I want to the value of the nodes whose name is either variable or group, so what's the right syntax to do things like?
<xsl:value-of select="/netcdf/variable or /netcdf/group"/>
Thanks in advance
Use (namespace declared with prefix
x):Do note that XSLT 1.0
xsl:value-ofwill return always the text value of the first element found. use betterxsl:copy-ofto show all returned elements.