W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

RE: important

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Sun, 3 Mar 2002 17:59:04 -0500
To: "'Khurram Majeed'" <khurri_7@yahoo.com>, "'Allan Clark'" <allanc@henhouse.chickenandporn.com>
Cc: <html-tidy@w3.org>
Message-ID: <000e01c1c307$07e9e140$6501a8c0@blackie>
Khurram Majeed wrote:

> consider this html 

>   <body> 
>       <p><font face=verdana size=3>Checking</font></p> 
>       <p>&nbsp;</p> 
>   </body> 


> Now, when i use tidy to convert this html to xml, 

What do you mean?  Do you mean generic XML, or XHTML?

> the resultant xml is 
>   <html> 
>     <body> 
>        <p><font face="verdana" size="3">Checking</font></p> 
>        <p>&nbsp;</p> 
>     </body>
>   </html>

> Now when this xml is viewed in Internet Explorer 5..the
> following error comes error : cannot identify &nbsp; at
> <p>&nbsp;</p> 

Your "XML" looks suspiciously like HTML or XHTML. ...

I'll take a guess -- your resultant filename is something like
"myfile.xml", and there is no DOCTYPE declaration?

If that's the case, what do you expect?  Generic XML only knows about
four "built-in" entities:  &lt;, &gt;, &quot;, and &amp;.  Now you're
throwing it one it's never heard of: &nbsp;!

> so what should i do then...how should i avoid this error. 

You haven't been clear about what you're trying to do.  *Why* have you
given your file a .xml extension (if that's the case!)?  What are you
trying to do with it?

If you really want it to be .xml, then make sure it references a DTD
where nbsp is declared (like, say, one of the XHTML DTDs. :).

Received on Sunday, 3 March 2002 17:59:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:51 UTC