[Home] [By Thread] [By Date] [Recent Entries]

  • To: o.sick@g...
  • Subject: Re: xml declaration in DTDs and encodings
  • From: John Cowan <jcowan@r...>
  • Date: Fri, 09 Nov 2001 10:21:03 -0500
  • Cc: xml-dev@l...
  • References: <200111091331.IAA29465@m...>
  • User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012

oliver sick wrote:

> Is it correct to start a DTD with the first line
> 
>   <?xml version="1.0" encoding="UTF-8" ?>


Yes.


> or even
>   <?xml version="1.0" ?>


No.

 
> In my opinion it's not correct to use the xml-declaration, 
> because a DTD is not xml.


At the beginning of an external entity other than the document
(main) entity, it is correct but not required to use a text
declaration.  This looks similar to an XML declaration, but with
the following differences:

	The encoding declaration part is required.

	The standalone declaration part is forbidden.

> On the other hand side if this declaration could not be used, 
> how can I determine the character encoding of DTDs ?

That is exactly why it is permitted.

-- 
Not to perambulate             || John Cowan <jcowan@r...>
    the corridors               || http://www.reutershealth.com
during the hours of repose     || http://www.ccil.org/~cowan
    in the boots of ascension.  \\ Sign in Austrian ski-resort hotel


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member