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

Entities, Tidy and valid XML.

From: Matthew Stanfield <matthew@propertyknowledge.com>
Date: Mon, 04 Mar 2002 17:41:07 +0000
Message-ID: <3C83B1B3.2CFFECB@propertyknowledge.com>
To: html-tidy@w3.org
Hi,

I'm using Tidy (specifically TidyCOM) to tidy 'messy' html into valid 'well
formed' xml before using XSLT to retrieve specific bits of data from the
tidied xml.

The web page is 'successfully' tidied and when I use XML Spy to check for
'well formedness' it says it is well formed. But when I then apply my XSLT
transformation to it, XML Spy says the "File is not well formed: Reference
to undefined entity 'nbsp'" [the entity is actually as you would expect
"&nbsp;" in the file, it's just the error that says "nbsp" instead of
"&nbsp;".]

I can get rid of this problem by setting the tidy option to "quote-nbsp: no"
in my options config file but when I do so I get the same error but with a
different entity, this time "&copy;".

If I then get rid of the "&copy;" entity manually (there is only one in the
file) then everything works fine.

Any suggestions as to what I should do would be greatly appreciated.

Thanks and regards,

..matthew
Received on Monday, 4 March 2002 12:54:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT