This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Extremely unreadable article, this sentence in the opening paragraph is too long and full of jargon w terms which are not wikified: "A DTD is primarily used for the expression of a schema via a set of declarations that conform to a particular markup syntax and that describe a class, or type, of SGML or XML documents, in terms of constraints on the structure of those documents." Little Professor ( talk) 18:41, 17 December 2007 (UTC)
Why the capital letters, instead of document type definition, in lower-case?
It would be nice if the example came with an explanation. At the moment, it's not terribly informative to the lay reader. For example, what does PCDATA mean? What is it in the example that makes the name MANDATORY but the other data items optional? -- Tarquin 15:50, 23 Dec 2003 (UTC)
I don't understand how a DTD and an XML namespace are different. Especially in the context of declaring your DTD
XML namespace when writing an XHTML page.
I'm surprised there was a mistake like this on the Wikipedia, which one would assume to be full of web geeks. I got rid of that little mistake on this article and there's now an article for the Document Type Declaration. It's only a stub but at least we're not parading around a lie anymore.-- holizz 22:40, 21 Nov 2004 (UTC)
I thought that, in XML, first there was DTD, and then along came XML Schema which was a more powerful way to specify what a valid XML document is. What is the relationship between an XML DTD and an XML Schema? I believe that I read that you should study XML DTDs first, but that they were superseded by the more powerful XML Schemas.
I must not understand because when I read the main article it seems to say that an XML DTD is an XML Schema.
Can someone clarify this for me?
Kaydell ( talk) 13:35, 23 July 2008 (UTC)
Sometimes people use the term "schema" to generically refer to all syntaxes for specifying the structure of XML documents, so this includes DTDs, XSD schemas, RELAX NG schemas, etc. Sometimes people use "schema" to refer to any XML-based way to specify XML document structure, so this refers to everything but DTDs. Unfortunately, most people use the term "schema" to refer to W3C XSD Schemas, because that's the most popular XML-based way to specify document structure. XSD schemas are more powerful in many ways than DTDs, but they are so much more complex that the added power often isn't worth it, implementations aren't consistent, and the W3C spec for it has parts that are just impossible to understand.
Bobdc ( talk) 16:22, 12 August 2008 (UTC)
An important feature of XML is that structured data can have a structured representation. The examples feature an xx/xx/xxxx style date. It has … just text (PCDATA), neither tags nor attributes. The slashes do not indicate a positional convention. IOW, the calendar date is using an ad hoc idiosyncratic syntax to indicate structure, in an XML document. And ambigous syntax at that! Even with xxxx being obviously the year, the two other number positions remain ambigous.
But this is a perfect use case for a DTD, since structural representation is precisely what a DTD can rectify, in this case using grammatical structuring of calendar dates. Since a day is a single item, I'd suggest an element type declaration for day, together with three attributes for the components of its calendar date. GeorgBauhaus ( talk) 14:09, 11 August 2010 (UTC)
<birthdate y="1977" m="2" d="4"/>
<birthdate>04/02/1977</birthdate>
There's no mention of DTD --comments-- in this article though many of the examples use them. Is http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.3.1 part of the formal DTD definition or is that something that's only in the HTML standard? -- Marc Kupper| talk 01:50, 21 December 2010 (UTC)
It may be merged into document type declaration. Sky6t ( talk) 04:56, 7 February 2012 (UTC)
I created a new section on security. It used to be possible to open XML files in MS Office, but Office 2010 refuses to open XML files with DTDs. I'm not an expert on this, so hopefully someone will expand this section, with an explanation of the error message "DTD prohibited". I suspect this is the main reason why Office users will find their way to this article. Margin1522 ( talk) 09:23, 21 October 2013 (UTC)
I don't think the examples given in the Entity declarations section are accurate at all. They seem to me to be obviously incorrect and invalid XML. — RockMFR 04:16, 4 February 2014 (UTC)
Readers of this page may be interested in thw following discussion:
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Extremely unreadable article, this sentence in the opening paragraph is too long and full of jargon w terms which are not wikified: "A DTD is primarily used for the expression of a schema via a set of declarations that conform to a particular markup syntax and that describe a class, or type, of SGML or XML documents, in terms of constraints on the structure of those documents." Little Professor ( talk) 18:41, 17 December 2007 (UTC)
Why the capital letters, instead of document type definition, in lower-case?
It would be nice if the example came with an explanation. At the moment, it's not terribly informative to the lay reader. For example, what does PCDATA mean? What is it in the example that makes the name MANDATORY but the other data items optional? -- Tarquin 15:50, 23 Dec 2003 (UTC)
I don't understand how a DTD and an XML namespace are different. Especially in the context of declaring your DTD
XML namespace when writing an XHTML page.
I'm surprised there was a mistake like this on the Wikipedia, which one would assume to be full of web geeks. I got rid of that little mistake on this article and there's now an article for the Document Type Declaration. It's only a stub but at least we're not parading around a lie anymore.-- holizz 22:40, 21 Nov 2004 (UTC)
I thought that, in XML, first there was DTD, and then along came XML Schema which was a more powerful way to specify what a valid XML document is. What is the relationship between an XML DTD and an XML Schema? I believe that I read that you should study XML DTDs first, but that they were superseded by the more powerful XML Schemas.
I must not understand because when I read the main article it seems to say that an XML DTD is an XML Schema.
Can someone clarify this for me?
Kaydell ( talk) 13:35, 23 July 2008 (UTC)
Sometimes people use the term "schema" to generically refer to all syntaxes for specifying the structure of XML documents, so this includes DTDs, XSD schemas, RELAX NG schemas, etc. Sometimes people use "schema" to refer to any XML-based way to specify XML document structure, so this refers to everything but DTDs. Unfortunately, most people use the term "schema" to refer to W3C XSD Schemas, because that's the most popular XML-based way to specify document structure. XSD schemas are more powerful in many ways than DTDs, but they are so much more complex that the added power often isn't worth it, implementations aren't consistent, and the W3C spec for it has parts that are just impossible to understand.
Bobdc ( talk) 16:22, 12 August 2008 (UTC)
An important feature of XML is that structured data can have a structured representation. The examples feature an xx/xx/xxxx style date. It has … just text (PCDATA), neither tags nor attributes. The slashes do not indicate a positional convention. IOW, the calendar date is using an ad hoc idiosyncratic syntax to indicate structure, in an XML document. And ambigous syntax at that! Even with xxxx being obviously the year, the two other number positions remain ambigous.
But this is a perfect use case for a DTD, since structural representation is precisely what a DTD can rectify, in this case using grammatical structuring of calendar dates. Since a day is a single item, I'd suggest an element type declaration for day, together with three attributes for the components of its calendar date. GeorgBauhaus ( talk) 14:09, 11 August 2010 (UTC)
<birthdate y="1977" m="2" d="4"/>
<birthdate>04/02/1977</birthdate>
There's no mention of DTD --comments-- in this article though many of the examples use them. Is http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.3.1 part of the formal DTD definition or is that something that's only in the HTML standard? -- Marc Kupper| talk 01:50, 21 December 2010 (UTC)
It may be merged into document type declaration. Sky6t ( talk) 04:56, 7 February 2012 (UTC)
I created a new section on security. It used to be possible to open XML files in MS Office, but Office 2010 refuses to open XML files with DTDs. I'm not an expert on this, so hopefully someone will expand this section, with an explanation of the error message "DTD prohibited". I suspect this is the main reason why Office users will find their way to this article. Margin1522 ( talk) 09:23, 21 October 2013 (UTC)
I don't think the examples given in the Entity declarations section are accurate at all. They seem to me to be obviously incorrect and invalid XML. — RockMFR 04:16, 4 February 2014 (UTC)
Readers of this page may be interested in thw following discussion: