xhtml/xml compliancy
xhtml/xml compliancy
Hi Sergey
My xml guru just told me that the you use frequently in your xhtml export are not complaint and cause many problems (missing entity declarations).
She suggest that you change them to their numeric equivalent (from memory she tought it was &160; which don't cause any problems when viewing the xml. She also thought there was a unicode numeric version.
My xml guru just told me that the you use frequently in your xhtml export are not complaint and cause many problems (missing entity declarations).
She suggest that you change them to their numeric equivalent (from memory she tought it was &160; which don't cause any problems when viewing the xml. She also thought there was a unicode numeric version.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hi,
The browser doesn't matter as long as it sees the output as html. But when you drop a xhtml saved as xml and removed the doctype as it's not understood by IE, it shows:
then IE will not show it once two spaces are typed and this a is inserted. This is caused by the modular design of the dtd for xhtml v1.1. which IE doesn't support.
IE shows the page correct if you insert a entity declaration like:
But it needs to be done for each entity used.
Firefox shows the page correctly including the docytpe and the nbsp's. BUt I'm not sure what happens if your not online and firefox can't access the dtd's url.
So bassically needs a dtd with the entity declared to be present, < not. The sample above shows is defined as
The browser doesn't matter as long as it sees the output as html. But when you drop a xhtml saved as xml and removed the doctype as it's not understood by IE, it shows:
Code: Select all
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Parameter entity must be defined before it is used. Error processing resource 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd...
%xhtml-prefw-redecl.mod;
-^
IE shows the page correct if you insert a entity declaration like:
Code: Select all
<!DOCTYPE html [
<!ENTITY nbsp " ">
]>
Firefox shows the page correctly including the docytpe and the nbsp's. BUt I'm not sure what happens if your not online and firefox can't access the dtd's url.
Code: Select all
XML Parsing Error: undefined entity
Location: file:///C:/Pim/temp/source.xml
Line Number 65, Column 25:<p>http://www.google.nl x</p>
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Still nbsp in xhtml.
Hi Sergey, I am working with your xhtml export. Seems like it still produces which later in my tool-chain breaks the xml parser (standard TXMLDocument)
You asked for references. According to wikipedia:)
http://en.wikipedia.org/wiki/List_of_XM ... references
the only characters escaped by &...; in xml are: quot, amp, apos, lt and gt
You asked for references. According to wikipedia:)
http://en.wikipedia.org/wiki/List_of_XM ... references
the only characters escaped by &...; in xml are: quot, amp, apos, lt and gt
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It looks like our XHTML refers to a wrong dtd:
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
I cannot find references to character entities in it.
I will change to
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
and
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
They start from
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
I cannot find references to character entities in it.
I will change to
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
and
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
They start from
Code: Select all
<!ENTITY % HTMLlat1 PUBLIC
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
"xhtml-lat1.ent">
%HTMLlat1;
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"xhtml-symbol.ent">
%HTMLsymbol;
<!ENTITY % HTMLspecial PUBLIC
"-//W3C//ENTITIES Special for XHTML//EN"
"xhtml-special.ent">
%HTMLspecial;
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: