Re: Netscape 6 support for XML

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Liberty Development
Message-ID <[email protected]>

EU citizen wrote:

> Netscape 6 is supposed to support XML. However it doesn' t display acute
> accented vowels (see
> http://homepage.ntlworld.com/r.a.mccartney/test/test_file_for_iso-8859-1.xml).
> Have I made some sort of mistake, or is support for XML  more patchy than is
> generally indicated?

Looking at the source of that file I find stuff like &aacute; which is a 
character reference making sense in HTML and XHTML but certainly not in 
XML in general. So an XML parser doesn't know what &aacute; stands for 
unless the DTD defines it and the parser reads the DTD but a 
non-validating XML parser like expat which Mozilla (and Netscape 6/7) 
use is not required to read external DTDs and usually doesn't do it.
So what you have there is something special, it is XML of course, but 
with elements in the XHTML namespace and with an external DTD referenced 
that defines those entities referenced in the document. So the problem 
for browser producers like Mozilla/Netscape as well as for Opera making 
use of an XML parser like expat is to somehow ensure some entities 
predefined are known in XHTML even if external DTDs are not loaded. I 
know some earlier Opera 7 therefore had problems displaying characters 
created by entity references defined in the XHTML DTDs and from what you 
say Netscape 6 also has the problem.

If you want to use some character in XML and want to make sure an XML 
parser understand it then use UTF-8 or UTF-16 as the encoding as that 
allows you to simply use all characters (well all characters the Unicode 
standards knows and XML allows) directly without the need for character 
references and as XML parsers are only required to support those two 
encodings. Hopefully with such a document Netscape 6 will you then show 
you "á" in the document correctly but I haven't tested.

As for Netscape 6 it has already been said that it was released before 
the Mozilla project regarded its browser project as mature and that 
later Netscape 7 releases (latest is 7.2) are certainly a better choice, 
nowadays with Netscape/AOL no longer focussing on creating a browser 
product from the Mozilla project but that project itself creating end 
user projects you can as well go directly to http://www.mozilla.org/ and 
use the Mozilla suite (latest 1.7.5) or Firefox 1.0.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.