Hi all,
Im confused with my html code for the time of w3c validation because its obvious that the closing and opening tags are in the right order.. and am using the html code inside the xml file.
so please have look into it my below error code,
my error is :
Line 620, Column 216: end tag for "table" which is not finished
…ellpadding="0" cellspacing="0"></table></td><td valign="top" width="144"><tabl…
my code is:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="first_count">
<xsl:value-of select="(count(/Countries/country[price = '0.5p']) div 4)"/>
</xsl:param>
<xsl:param name="second_count">
<xsl:value-of select="((count(/Countries/country[price = '0.5p']) * 2) div 4)"/>
</xsl:param>
<xsl:param name="third_count">
<xsl:value-of select="((count(/Countries/country[price = '0.5p']) * 3) div 4)"/>
</xsl:param>
<xsl:param name="countall">
<xsl:value-of select="(count(/Countries/country[price = '0.5p']))"/>
</xsl:param>
<xsl:template match="Countries">
<table width="631" border="0" cellspacing="0" cellpadding="7">
<tr>
<td valign="top" width="144">
<table width="140" cellpadding="0" cellspacing="0">
<xsl:for-each select="country[price='0.5p']">
<xsl:if test="position() <= $first_count ">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<tr>
<td class="black">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td class="grey">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</table>
</td>
<td valign="top" width="144">
<table width="140" cellpadding="0" cellspacing="0">
<xsl:for-each select="country[price='0.5p']">
<xsl:if test="position() > $first_count and position() <= $second_count ">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<tr>
<td class="black">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td class="grey">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</table>
</td>
<td valign="top" width="144">
<table width="140" cellpadding="0" cellspacing="0">
<xsl:for-each select="country[price='0.5p']">
<xsl:if test="position() > $second_count and position() <= $third_count ">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<tr>
<td class="black">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td class="grey">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</table>
</td>
<td valign="top" width="144">
<table width="140" cellpadding="0" cellspacing="0">
<xsl:for-each select="country[price='0.5p']">
<xsl:if test="position() > $third_count">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<tr>
<td class="black">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td class="grey">
<xsl:value-of select="name"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
thanks to advance...