This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] OT: XML decl. in DTD


Hi Dave,

I was about to reply to the initial post with some links from the XML spec
when Jirka anwered it.

> >It's perfectly legal. External DTD is in this sense treated as an
external
> >entity which can start with encoding declaration.
>
>
> Jirka, I think Michael said at the top of the DTD file?
> In which case I don't think its right?
> I.e. dtd's were prior to XML, hence its misplaced.

In section 2.8 in the document type declaration definition the DTD external
subset is said to be a special kind on external entity
(http://www.w3.org/TR/2004/REC-xml-20040204/#sec-prolog-dtd) and more it is
an external parsed entity.
Now looking in section 4.3 you can see that external parsed entities SHOULD
begin with a text declaration
(http://www.w3.org/TR/2004/REC-xml-20040204/#TextEntities):
[77]   TextDecl   ::=   '<?xml' VersionInfo? EncodingDecl S? '?>'
More, if the external parsed entity has an encoding different than UTF-8 or
UTF-16 the text declaration MUST be present, see the link to section 4.3.3
below.

> >>What would happen if an XML file contains a different encoding (<?xml
> >>version="1.0" encoding="ISO-8859-1"?>)?
>
> Perhaps two wrongs do make a right :-)

This is explained in section 4.3.3
(http://www.w3.org/TR/2004/REC-xml-20040204/#charencoding)

Best Regards,
 George
-------------------------------------------------------
George Cristian Bina mailto:george@oxygenxml.com
<oXygen/> XML Editor - http://www.oxygenxml.com/


To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]