Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > must specify "encoding" attribute in DTD. Why?

Reply
Thread Tools

must specify "encoding" attribute in DTD. Why?

 
 
Kent Tong
Guest
Posts: n/a
 
      02-20-2004
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!
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      02-20-2004
In article <(E-Mail Removed) >,
Kent Tong <(E-Mail Removed)> 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!
 
Reply With Quote
 
 
 
 
Kent Tong
Guest
Posts: n/a
 
      02-21-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Richard Tobin) wrote in message news:<c14us9$1o64$(E-Mail Removed)>...
> In article <(E-Mail Removed) >,
> Kent Tong <(E-Mail Removed)> 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!
 
Reply With Quote
 
Soren Kuula
Guest
Posts: n/a
 
      02-22-2004
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.

 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      02-23-2004
In article <FD2_b.94920$(E-Mail Removed)> ,
Soren Kuula <(E-Mail Removed)> 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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Must specify mapping for all key properties for Entity E' error Justin Dutoit ASP .Net 1 02-17-2009 01:16 PM
pointer to a member function of a class - must specify class? Matthew C++ 3 02-08-2009 12:02 AM
You must specify the PHP executable used for the debug session Scubadude Perl Misc 1 01-20-2007 10:50 PM
simple problem trying to specify a unique attribute with XML schema smachin1000@gmail.com XML 2 07-27-2006 08:07 PM
smtp mail in asp.net -- Must specify FROM -- interacts with Exchange? KathyB ASP .Net 2 08-28-2003 04:16 PM



Advertisments