Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - =?ISO-8859-1?Q?Should__be_in_a_DTD??= >Thread Next - Re: =?ISO-8859-1?Q?Should__be_in_a_DTD??= Re: =?ISO-8859-1?Q?Should__be_in_a_DTD??=To: NULL Date: 12/3/2007 5:11:00 PM admyc wrote: > I understand the line: > <?xml version="1.0"?> > in an XML document to be there to tell the program dealing with the > document that it is a document written in XML and the version of XML > it is written in is version 1.0. > > When it comes to DTDs I have seen some examples where this line ('<? > xml version="1.0"?>'), is included in the DTD too and I can't > understand why it is there. > > In an XML document this line is there to declare it as an XML document > but a DTD is not an XML document so I can not see why it is there. > > I think that this line should not be in a DTD as I can't figure out > what possible use it is. Can anyone either confirm that this line is > erroneously included in some DTD examples or tell me what possible use > it can server in one? See <URL:http://www.w3.org/TR/REC-xml/#sec-prolog-dtd> about the "text declaration" that the external subset can begin with. So <?xml version="1.0"?> or <?xml version="1.0" encoding="UTF-16"?> is perfectly right at the beginning of an external subset (DTD). -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
