PDA

View Full Version : VI delimiter and SHORTTAG YES


reubenb
12-03-2003, 07:36 AM
hello,
can someone please help me out with this w3c error message:


This page is not Valid XHTML 1.0 Transitional!
Below are the results of attempting to parse this document with an SGML parser.

Line 52, column 44: the name and VI delimiter can be omitted from an attribute specification only if SHORTTAG YES is specified
<tr><td valign="top" align="left" nowrap>


below is the full code:

<td width="26%" height="57">
<table border="0" width="98%" id="table3">
<tbody>
<tr><td valign="top" align="left" nowrap>
<div id="newsbar">

<p><font size="3">n e w s&nbsp; b a r</font>&nbsp; ►
<br /><br />►21st July 2003<br />
Gough Whitlam stars in movie.<br />
<br />►19th March 2004<br />
Michael Samson gets job.<br />
<br />►20th March 2004<br />
Project makes movies.<br />
<br />►31st July 2004<br />
Simon Crean elected moviestar.<br />
<br />►1st August 2004<br />
Cinema Vault website completed.<br />
<br />►26th Decmeber 2004<br />
Holiday starts for everyone here.</p>
</div>
</td>

<td width="0"></td>
</tr>
</tbody>
</table>
</td>
</tr>

(its not really php but that is the only way i could get it to format it properly :D)

thanks..

liorean
12-03-2003, 10:53 AM
Originally posted by reubenb
hello,
can someone please help me out with this w3c error message:

This page is not Valid XHTML 1.0 Transitional!
Below are the results of attempting to parse this document with an SGML parser.

Line 52, column 44: the name and VI delimiter can be omitted from an attribute specification only if SHORTTAG YES is specified
<tr><td valign="top" align="left" nowrap>

Well, it's simple, really. XHTML doesn't allow minimisation such as
<... nowrap>. All attributes must consist of an attribute name, an equal sign, and an attribute value which must be written within single or double quotes. The attribute value in the cases of the attributes that could be minimised in HTML are supposed to be the same as the attribute name.

From the XHTML 1.0 Transitional DTD:
<!ATTLIST td
%attrs;
abbr %Text; #IMPLIED
axis CDATA #IMPLIED
headers IDREFS #IMPLIED
scope %Scope; #IMPLIED
rowspan %Number; "1"
colspan %Number; "1"
%cellhalign;
%cellvalign;
nowrap (nowrap) #IMPLIED
bgcolor %Color; #IMPLIED
width %Length; #IMPLIED
height %Length; #IMPLIED
>
If you don't know what that tells you, I can explain it. The first column specifies the name of the attribute. The second it's type or a set of allowed values within parentheses. The third it's default state. #IMPLIED means it's not required to be present, and has no default value.

reubenb
12-03-2003, 11:15 AM
oh yeah

so

<td valign="top" align="left" nowrap="nowrap">

is right?

ahh, i get it now.
I wish w3C would simplify their errors


thanks :D

liorean
12-03-2003, 11:47 AM
W3C has already simplified a lot of their errors since the last revision of the validator. However, as it's hard to be correct and at the same time be useful, they settled on correct sometimes, which makes for error messages that you must know the basics of XML and SGML to be able to dechifer. If you use 'fussy' validation you get error messages more targetted at non-SGML/XML-experts.