J
Jim
Hi
I have foo.xml:
<file>
<area1>
<name>John</name>
<age>22</age>
</area1>
<area2>
<weight>200</weight>
<height>73in</height>
</area2>
</file>
I have foo.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="text"/>
<xsl:template match="file/area1">
<xsl:value-of select="name"/>
<xsl:value-of select="age"/>
</xsl:template>
<xsl:template match="file/area2">
<xsl:value-of select="height"/>
<xsl:value-of select="weight"/>
</xsl:template>
</xsl:stylesheet>
I only want area1 and area2 information displayed. However, when I
apply this stylesheet, I get everything. How do I ignore/suppress area2
in foo.xml?
I have foo.xml:
<file>
<area1>
<name>John</name>
<age>22</age>
</area1>
<area2>
<weight>200</weight>
<height>73in</height>
</area2>
</file>
I have foo.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="text"/>
<xsl:template match="file/area1">
<xsl:value-of select="name"/>
<xsl:value-of select="age"/>
</xsl:template>
<xsl:template match="file/area2">
<xsl:value-of select="height"/>
<xsl:value-of select="weight"/>
</xsl:template>
</xsl:stylesheet>
I only want area1 and area2 information displayed. However, when I
apply this stylesheet, I get everything. How do I ignore/suppress area2
in foo.xml?