Questions tagged [dtd]

DTD stands for "Document Type Definition" as specified in the XML 1.x Recommendations of the W3C. DTDs define formal grammars for XML documents: which tags you can use and where you can use them. Validating XML processors apply this grammar to XML documents to determine whether they conform to these grammars, in which case the document is "valid".

DTD stands for "Document Type Declaration" as specified in the XML 1.x Recommendations of the W3C (see http://www.w3.org/TR/xml/).

The XML document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or DTD. The document type declaration can point to an external subset (a special kind of external entity) containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. The DTD for a document consists of both subsets taken together.

DTDs were also specified in SGML (ISO 8879:1986), the forbear to XML. SGML DTDs are more feature-rich than XML DTDs, allowing for example the specification of tag minimization features.

References:

1433 questions
0
votes
1 answer

can com.google.gwt.xml.client.XMLParser configured to disallow doctype?

My question is regarding the XML Parser of google: com.google.gwt.xml.client.XMLParser. Can it be configured to disallow external doctype or doctype at all? As i understand SAXParser has that option with…
Tal
  • 1,773
  • 4
  • 18
  • 20
0
votes
1 answer

valid parsed character XML data

If I define an element such as this in a DTD Are the following both valid? foo & bar
Dónal
  • 185,044
  • 174
  • 569
  • 824
0
votes
1 answer

XML Validation Fatal Error - The Markup in the document following the root element must be well formed

I'm getting an error (Fatal Error - The Markup in the document following the root element must be well formed) when I try to validate the following XML code:
kmaz13
  • 260
  • 1
  • 5
  • 14
0
votes
1 answer

How can i restrict the text of an element?

Possible Duplicate: DTD element type problem I have an xml in which i have element facilities. Internet Facilities can have at least one or more of the followings: Internet, Gym, Free Parking, Restaurant, Pick-up, Pool, Conference hall, Banquet…
Abdul Rauf
  • 763
  • 2
  • 8
  • 28
0
votes
1 answer

XML won't get validated using two (2) tables in xml - two XMLs into one ?

Given the next XML code : MoscowCity
Sherman23
423423432423
JAN
  • 21,236
  • 66
  • 181
  • 318
0
votes
1 answer

Is it possible to declare in the same XML file , the same field , in a different table ?

Given the DTD file below : !ELEMENT hotels (address+)>
JAN
  • 21,236
  • 66
  • 181
  • 318
0
votes
2 answers

Using a DTD to Specify an xml file with an element with free form

I have an xml file which is specified for most of it. Only one element doesn't have specification and can contains arbitrary xml elements. Here are an example of this xml:
amirouche
  • 7,682
  • 6
  • 40
  • 94
0
votes
1 answer

dtd elements and attributes

i'm having trouble with my dtd file. i'm writing this for an order form. the order form has a case color, amount of batteries, recharger, arms, camera, and speech. what i am trying to do is incorporate the length of the arms. i have arms…
beginnerprogrammer
  • 183
  • 2
  • 5
  • 22
-1
votes
0 answers

Validate xml-file against dtd-file that includes modules (.ent) - using python, lxml

Loading a local dtd-file, my script (see below) can properly check my xml-file. But If I a take a dtd-file that includes modules (.ent) my script ignores them. I checked that by removing these files which raised no error. How can I make my script…
-1
votes
1 answer

How do I allow #PCDATA without forcing it and how do I deny #PCDATA?

I would like to get an xml structor like: allowno#PCDATA allowallow#PCDATA I have:
-1
votes
1 answer

Are there cases where something expressed in XML DTD turns out to be buggy, but not in the XML Schema due to datatype constraints?

I heard that the XML DTD has less constraints in place (esepcially for the datatypes) than the XML Schema, and was wondering if this lack of constraints can make something expressed in XML DTD very buggy, but re-expressing it in the XML Schema…
LilyPod
  • 1
  • 1
-1
votes
1 answer

Which or which of the following statements is true in XML?

I think the answer is nr 2, but I am not sure. I also think that XML is case sensetive, could somone help? An XML schema in the Document Type Definition (DTD) format can be described more expressively than a in the XML Schema Definition (XSD) …
-1
votes
1 answer

xml dtd or xml schema link elements with different attribute

I need to create DTD or XMLSchema. How do i link elements collection@key="role" with collection@key="tie"? Is this possible or do they need to be done in different elements? I have XML
MFS
  • 9
  • 2
-1
votes
2 answers

Keep getting "No declaration for element" errors. What is wrong with this XML/DTD?

I have created a simple XML and a DTD, but for some reason every single validator I try keep giving me "No declaration for element" errors on every single line. I am not quite sure what I have done wrong as I have only just started looking into XML…
Ginger
  • 43
  • 7
-1
votes
1 answer

How could i execute XML and DTD?

I am working on trying to understand more about DTD and XML, and i have come across an issue. In fact, I have understood the syntax of DTD and XML but i am working on visual studio code and i wasn't able to execute the code. How can i execute de…
George Fs
  • 7
  • 3