What is a schema? What are the limitations of a DTD?

  
Showing Answers 1 - 5 of 5 Answers

K.Hari Kishore

  • Jun 16th, 2005
 

Hi this is hari. SCHEMA is nothing but METADATA. The schema holds all the information of the xml file that is to be deployed in the project. Metatdata is nothing about data about data since we know that xml is used for data representation language we will be able to understand what metadata is. Metadata includes the tags that is going to be exchanged to and fro from another xml file. DTD (DATA TYPE DEFINITION ) which supervises two conditions namely well formedness and closeness of the xml file. So the user should be aware of what tags he was put into use of this xml file 'A' should be intimated to another application's XML file 'B', by then our xml file will interact with the another xml file, this is the major limitation and mandatory issue that the developers should follow. 
 

Yoke

  • Mar 25th, 2006
 

Just a small correction:

DTD stands for Document Type Definition and not Data Type Definition.

In addition to Document type definitions, Schema supports data type definitions too.

XML 1.0 does not provide option to use namespace in DTD's. whereas Schema provides.

  Was this answer useful?  Yes

Venkat P

  • Nov 23rd, 2006
 

Schema represents the Grammar of XMl document instanace used by Parser to check the well formed ness and validition of XML document instance with respect to schema we defined.In case of DTD it wont allow us to define our own datatype mean creating our own datatype based on the primitive types.In case of XSD(XML Schema Language ) is used to define elements based on primitive types and complex types.Simple Types - Based on the language supporting types.Complex Types - Refering user define data type with set of Primitive typessay,, for example as give below we can refer this complex type element as element type as,we can in the above that we are refering the element "location' with our userdefined type "Address"This kind of support we dont have in DTD's it only supports PCDATA and CDATA sections with primitive data type supportThanks,Venkat P

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions