Sunday, 13 November 2011

Unique Content Article on xml training,web development,computer training,software

XML Training On The Basics of XML Schema


by Francisco Ward


XML schema definition languages are based on the recommendations of the World Wide Web Consortium (W3C). They use XML 1.0 syntax and aim to explicit describe the structure of XML documents and constrain the data which they may contain. They offer a distinct improvement on the more limited schema features offered by the Document Type Definition (DTD) recommendation which formed part of the original XML specification released in 1998. The most widely used schema language is the one defined by the W3C in 2001: W3C XML Schema. However, there are alternatives, such as RELAX NG and Schematron.

Schema documents are the more sophisticated successors to DTDs and overcome some key limitations associated with them. Firstly, DTDs do not support data types. Secondly, DTDs do not support namespaces. Thirdly, DTDs do not allow developers to accurately define the number of permitted occurrences of elements within their parent element.

An XML schema is concerned with the structure of an XML instance document by defining what each element must or may contain. An element is limited by its type. For example, an element of complex type can contain child elements and attributes, whereas a simple-type element can only contain text. The diagram below gives a first look at the types of XML Schema elements.

Three main purposes are fulfilled by schema documents. Firstly, they can be used to validate XML documents. Secondly, they can be used as a dictionary or grammar for the creation of a given class of XML document. And, thirdly, they can be used to provide documentation for XML documents.

Each XML schema is itself an XML document and contains definitions of all elements and attributes permitted in a given class of XML documents. The schema also specifies the structure or hierarchy to which elements must adhere and the type of content each particular element may contain. Elements may be of the simple or complex type. Complex type elements may contain child elements as well as attributes. Simple type element may only contain data. XML documents using a particular schema are referred to as instances of the schema. An XML instance that correctly adheres to its associated schema is said to be valid.

Validation is usually the main purpose of schema documents. Validation offers many benefits. It ensures the consistency of data within a document. It ensures that data has the right structure and internal hierarchy. It ensures that data within the document structure is of the correct type. It allows us to receive data from multiple sources.

Most XML documents are produced by programs and scripts written to extract information held in databases and transform it into XML. However, it is also possible for human beings to create XML documents. Schemas can be used during this process to assist in the document creation process. XML schemas also provide a mechanism for documenting XML documents and form an important part of the specification of XML vocabularies.




About the Author:





You are receiving this because you signed up for it on 2011-10-03 from IP 203.109.66.181


To fine-tune your selection of which articles to receive, just login here
using your username:


To unsubscribe please use the following link:

Unsubscribe



No comments:

Post a Comment