L
lievemario
I've written a small xsl file,
but it is not working, it doesn't do the xsl:when test,
what is wrong with it?
The xsl-file:
********
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet
version="1.0":xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template
match="Faculty/select"><html><body>
<xsl:for-each select="group">
<xsl:variable name="type">
<xsl:value-of select="team_type" />
</xsl:variable><xsl:choose>
<xsl:when test="$type='V'">
<xsl:value-of select="name_dutch"/>
<xsl:value-of select="team_code"/>)<br/>
</xsl:when> </xsl:choose></xsl:for-each>
</body></html></xsl:template></xsl:stylesheet>
the xml-file-extraction
*****************
<?xml version="1.0" encoding="ISO-8859-1"?>
<Faculty><select><group>
<team_code>DWIS</team_code>
<name_dutch>Wiskunde</name_dutch>
<team_type>V</team_type>
</group></select></Faculty>
but it is not working, it doesn't do the xsl:when test,
what is wrong with it?
The xsl-file:
********
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet
version="1.0":xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template
match="Faculty/select"><html><body>
<xsl:for-each select="group">
<xsl:variable name="type">
<xsl:value-of select="team_type" />
</xsl:variable><xsl:choose>
<xsl:when test="$type='V'">
<xsl:value-of select="name_dutch"/>
<xsl:value-of select="team_code"/>)<br/>
</xsl:when> </xsl:choose></xsl:for-each>
</body></html></xsl:template></xsl:stylesheet>
the xml-file-extraction
*****************
<?xml version="1.0" encoding="ISO-8859-1"?>
<Faculty><select><group>
<team_code>DWIS</team_code>
<name_dutch>Wiskunde</name_dutch>
<team_type>V</team_type>
</group></select></Faculty>