must specify "encoding" attribute in DTD. Why?

Discussion in 'XML' started by Kent Tong, Feb 20, 2004.

  1. Kent Tong

    Kent Tong Guest

    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!
     
    Kent Tong, Feb 20, 2004
    #1
    1. Advertising

  2. In article <>,
    Kent Tong <> 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!
     
    Richard Tobin, Feb 20, 2004
    #2
    1. Advertising

  3. Kent Tong

    Kent Tong Guest

    (Richard Tobin) wrote in message news:<c14us9$1o64$>...
    > In article <>,
    > Kent Tong <> 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!
     
    Kent Tong, Feb 21, 2004
    #3
  4. Kent Tong

    Soren Kuula Guest

    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.
     
    Soren Kuula, Feb 22, 2004
    #4
  5. In article <FD2_b.94920$>,
    Soren Kuula <> 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!
     
    Richard Tobin, Feb 23, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack Andersson
    Replies:
    0
    Views:
    391
    Jack Andersson
    Nov 24, 2004
  2. Ronald Fischer
    Replies:
    4
    Views:
    1,761
    Ronald Fischer
    Mar 17, 2005
  3. Marcio DeBarros
    Replies:
    2
    Views:
    2,340
    Marcio DeBarros
    Oct 2, 2003
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,969
    Smokey Grindel
    Dec 2, 2006
  5. NeoGeoSNK
    Replies:
    25
    Views:
    932
    NeoGeoSNK
    Nov 24, 2006
Loading...

Share This Page