验证错误“表格​​”的结束标记哪个没有完成“? [英] Validation Error "End tag for "table" which is not finished"?

查看:117
本文介绍了验证错误“表格​​”的结束标记哪个没有完成“?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我对w3c验证时的html代码感到困惑,因为它显然是关闭和打开标签的顺序正确。并且我正在使用xml文件中的html代码。



所以请查看我的下面的错误代码,



我的错误是:



第620行,第216列:table的结束标记未完成



... ellpadding =0cellspacing =0>< / table>< / td>< td valign =top width =144>< tabl ...



我的代码是:

 <?  xml     version   =  1.0   编码  =  utf-8  >  
< xsl:stylesheet 版本 = 1.0

xmlns:xsl = http://www.w3.org / 1999 / XSL / Transform >

< xsl:param name = first_count >
< xsl:value-of 选择 = (count(/ Countries / country [price] ='0.5p'])div 4) / >
< / xsl:param >
< xsl:param 名称 = second_count >
< xsl :value-of 选择 = ((count(/ Countries / country [price ='0.5p'])* 2)div 4) / >
< / xsl:param >
< xsl:param name = third_count >
< xsl:value-of 选择 = ((count(/ Countries / country [price ='0。 5p'])* 3)div 4) / >
< / xsl:param >
< xsl:param 名称 = countall >
< xsl:value-of 选择 = (count(/ Countries / country [price ='0.5p'])) / >
< / xsl:param < span class =code -keyword>>

< xsl:template 匹配 = 国家/地区 >
< table width = 631 border = 0 < span class =code-attribute> cellspacing = 0 cellpadding = 7 >
< tr >
< td valign = top width = 144 >
< table width = 140 cellpadding = 0 cellspacing = 0 >
< span class =code-keyword>< xsl:for-each 选择 = country [price ='0.5p'] >
< xsl :if test = position()& lt; = $ first_count >
< xsl:choose >
< xsl:when test = position()mod 2 = 1 >
< tr >
< td class = black >
< xsl:value-of 选择 = 名称 / >
< / td >
< / tr >
< / xsl:when < span class =code-keyword>>
< xsl:otherwise >
< tr >
< td class = grey >
< xsl:value-of 选择 = 名称 / >
< / td >
< / tr > ;
< / xsl:otherwise >
< / xsl:choose >
< / xsl:if >

< / xsl:for-each >
< / table >
< / td >
< td valign = top width = 144 >
< table < span class =code-attribute> width
= 140 cellpadding = 0 cellspacing = 0 >
< xsl:for-each select = country [price ='0.5p'] >

< xsl: if test = position()& gt; $ first_count和position()& lt; = $ second_count >
< xsl:choose >
< xsl:when test = position()mod 2 = 1 >
< tr >
< td class = black >
< xsl:value-of 选择 = name / >
< / td >
< / tr >
< / xsl:when >
< xsl:否则 >
< span class =code-keyword> < tr >
< td class = 灰色 >
< xsl:value-of 选择 = 名称 < span class =code-keyword> / >
< / td >
< / tr >
< / xsl:otherwise >
< / xsl :选择 >
< / xsl:if >

< / xsl:for-each >
< / table >
< / td >
< td valign = top width = 144 >
< width = 140 cellpadding = 0 cellspacing = 0 >
< xsl:for-each select = country [price ='0.5p'] >

< xsl:if test = position( )& gt; $ second_count和position()& lt; = $ third_count >
< xsl:choose >
< xsl:when test = position()mod 2 = 1 >
< tr >
< td class = black >
< xsl:value-of 选择 = name / >
< / td >
< / tr >
< / xsl:when >
< xsl:否则 >
< span class =code-keyword> < tr >
< td class = 灰色 >
< xsl:value-of 选择 = 名称 < span class =code-keyword> / >
< / td >
< / tr >
< / xsl:otherwise >
< / xsl :选择 >
< / xsl:if >

< / xsl:for-each >
< / table >
< / td >
< td valign = top width = 144 >
< width = 140 cellpadding = 0 cellspacing = 0 >
< xsl:for-each select = country [price ='0.5p'] >

< xsl:if test = position( )& gt; $ third_count >
< xsl:choose >
< xsl:when test = position()mod 2 = 1 >
< tr >
< td class = black >
< xsl:value-of 选择 = name / >
< / td >
< / tr >
< / xsl:when >
< xsl:否则 >
< tr >
< td class = 灰色 >
< xsl:value-of 选择 = 名称 / >
< / td >
< / tr >
< / xsl:otherwise >
< / xsl:choose >
< / xsl:if >

< / xsl:for-each >
< / table >
< / td >
< / tr >
< / table >
< / xsl:template >

< / xsl:stylesheet >





感谢提前...

解决方案

first_count >
< xsl:choose >
< xsl:when test = position()mod 2 = 1 >
< tr >
< td < span class =code-attribute> class = black >
< xsl:value-of select = 名称 / >
< / td >
< / tr >
< / xsl:when >
< xsl:否则 >
<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() &gt;

first_count and position() &lt;=


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() &gt;


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() &lt;= $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() &gt; $first_count and position() &lt;= $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() &gt; $second_count and position() &lt;= $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() &gt; $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...

解决方案

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() &gt;


first_count and position() &lt;=


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() &gt;


这篇关于验证错误“表格​​”的结束标记哪个没有完成“?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆