471,852 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,852 software developers and data experts.

must specify "encoding" attribute in DTD. Why?

Hi,

Why is it required to specify the encoding pseudo attribute in
a DTD? For example, it is OK to have:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!ELEMENT ...>

But it causes Xerces to report an error of "more pseudo attributes
expected" if it is:

<?xml version="1.0"?>
<!ELEMENT ...>

Where is it mentioned in the W3C XML recommendation? Thanks
for any pointer!
Jul 20 '05 #1
4 6123
In article <c9**************************@posting.google.com >,
Kent Tong <ke**@cpttm.org.mo> wrote:
Why is it required to specify the encoding pseudo attribute in
a DTD?
I'm not sure; maybe it was thought that there was no point to it if
it didn't specify the encoding, but it might be useful just for
the version number.
Where is it mentioned in the W3C XML recommendation?


Production 77.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #2
ri*****@cogsci.ed.ac.uk (Richard Tobin) wrote in message news:<c1***********@pc-news.cogsci.ed.ac.uk>...
In article <c9**************************@posting.google.com >,
Kent Tong <ke**@cpttm.org.mo> wrote:
Why is it required to specify the encoding pseudo attribute in
a DTD?


I'm not sure; maybe it was thought that there was no point to it if
it didn't specify the encoding, but it might be useful just for
the version number.
Where is it mentioned in the W3C XML recommendation?


Production 77.


Thanks!
Jul 20 '05 #3
Kent Tong wrote:
Hi,

Why is it required to specify the encoding pseudo attribute in
a DTD? For example, it is OK to have:


You should always specify encoding. Otherwise, exchanging information
further than between your couple of computers :) eventually gets
somebody's headache.
We see all the time here in Denmark that some people still think ASCII
covers everyting (it's insufficient for anywhere but America), and, even
worse, the implicit assumption that everything is ISO8859-1.

--
Fjern de 4 bogstaver i min mailadresse som er indsat for at hindre s...
Remove the 4 letter word meaning "junk mail" in my mail address.

Jul 20 '05 #4
In article <FD*********************@news000.worldonline.dk> ,
Soren Kuula <do**********@bitplanet.net> wrote:
We see all the time here in Denmark that some people still think ASCII
covers everyting (it's insufficient for anywhere but America),


That's an exaggeration: ASCII is quite sufficient for most documents
in English. On the rare occasions that I might want to put, say, a
pound (sterling) symbol in an XML document, I can use a character
reference.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Gustaf Liljegren | last post: by
4 posts views Thread by peter | last post: by
4 posts views Thread by =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post: by
1 post views Thread by relrozen | last post: by
NeoPa
reply views Thread by NeoPa | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.