The book doesn't require any pre-existing knowledge of XML or related technologies. You could judge the time by determining how long it is likely to take you to finish and absorb a book of similar length.
What is an XML Schema? The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD.
An XML Schema:
defines elements that can appear in a document defines attributes that can appear in a document defines which elements are child elements defines the order of child elements defines the number of child elements defines whether an element is empty or can include text defines data types for elements and attributes defines default and fixed values for elements and attributes
Originally posted by Nitin Nigam: Hi rajan, thanks for the reply. Just one more thing...as u described about Schema, the same is the duty of DTD. Then what is the differencec between them? When we use schema and when we use DTD?
Hello, As far as I know, XML Schema is super set of DTD. And XML Schema use XML syntax for its logic.
The term schema is a generic term for anything that describes an XML vocabulary. In broad terms, the schema explains the structure of elements and their attributes in the XML documents. A validating parser can use it to check that an XML document is valid.
There are several way to describe a schema - one of the oldest is a DTD (Document Type Definition). Another is using the XML Schema Language (XSD). The two aren't related to each other.
The main differences are that: DTD's don't use an XML structure whilst XML Schemas do. A DTD allows entities to be defined, an XML Schema does not. XML schemas allow data types to be assigned to character data. XML schemas allow you to define custom data types. XML schemas have good support for namespaces, while a DTD has none. XML schemas allow for including and importing other schema documents. A DTD uses a more concise syntax than XML Schema, resulting in smaller documents. The XML Schema language is newer than the DTD specification, and so has addressed some of the weaknesses of DTDs.
To add more XML schemas 1. Have a standard way to represent NULL elements. 2. Have support for inheritance, restriction, abstraction etc 3. Can define Enumeration for attributes while DTD one can define it only for attributes. 4. supports about 44 datatypes 5. More elegant to say that an element can occur from 20 to 300 times. Imagine doing this using DTD.
A DTD is 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 DTD can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can even do both.
A Schema is XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents.
In summary, schemas are a richer and more powerful of describing information than what is possible with DTDs.