Define DTD (Document Type definition).DTD - Document Type Definition defines the legal building blocks of an XML document.
- It defines the document structure with a list of legal elements and attributes. - XML DTD is a rule book that an XML document follows. Once DTD is ready, you can create number of XML documents following the same rules specified in the DTD. DTD can be internal or external DTD. The internal DTD is included in the XML document, while external DTD exists outside the content of the documents.Explain DTD and schema.- A DTD provides a list of the elements, attributes, comments, notes, and entities contained in an XML or HTML document and indicates their relationship with each other. - The 'DOCTYPE' tells the browser that it is a Document Type Declaration.
Some commonly used attribute types are
1. CDATA The value is character data 2. ID The value is a unique id 3. IDREF The value is the id of another element 4. IDREFS The value is a list of other ids
Schema means the organization and the structure of a database.
Example : An XML schema is a description of XML document. It is expressed in terms of constraints on the structure and content of documents.Define XML DTD.XML DTD is a rule book that an XML document follows. Once DTD is ready, you can create number of XML documents following the same rules specified in the DTD. DTD can be internal or external DTD. The internal DTD is included in the XML document, while external DTD exists outside the content of the documents.
|