I have tested below XML and XSL with Transformation tool. Output does not show any data row. Can anyone help me to find out the issue?
I used below online tool.
XML
<?xml version="1.0" encoding="UTF-8"?>
<vehicles xmlns="http://ift.tt/rAg5Mm"
xmlns:xsi="http://ift.tt/1AHdCV3">
<vehicle>
<make>Toyota</make>
<model>Prius</model>
<color>White</color>
<yearofmanufacture>2013</yearofmanufacture>
<engine>1.5CC</engine>
<doors>5</doors>
</vehicle>
</vehicles>
XSL
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://ift.tt/tCZ8VR">
<xsl:template match="/">
<html>
<body>
<h2>Car Sale - Stock List</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Make</th>
</tr>
<xsl:for-each select="vehicles/vehicle">
<tr>
<td>
<xsl:value-of select="make" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output:
Car Sale - Stock List
Make
No comments:
Post a Comment