Schemas

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
A schema describes the structure of the information that is to be displayed by the XML document. The term schema is actually used to describe the data structure in relational tables. In XML, a schema represents the order in which the user defined tags are to be arranged and the text that the valid document can contain. A schema serves as a standard for an application where an exchange of documents takes place.

Let us consider the following example:

Whenever you think of a library a mental schema would appear in your mind that will probably include the title of the book, its author, name of the publisher and the ISBN number. Obviously the above schema would be a valid one.

A schema model is represented in terms of a set of constraints. The content within the schema in a given context is defined by the constraints. There are two types of constraints namely:

1 . Content model constraint: This constraint determines the order and sequence in which the elements are to be used.

2. Datatype constraint: This constraint determines the valid units of data.

For example, a schema might describe a valid <LIB> with the content model constraint that it consists of a <TITLE> element, followed by one <AUTHOR> element, followed by <ISBN>, and a <PUBLISHER> element. The content of an <ISBN> might have a further datatype constraint that it can contain a sequence of exactly ten digits separated by hyphens in between the first and the second digits and in between the fifth and the sixth digits. Any other sequence of digits is invalid for the element <ISBN>.

The objective of defining a schema is to perform machine validation of the document structure. Each element in the document is validated with the schema definitions which determine whether the contents are valid are not.

With the help of the above schema a parser would be able to conclude that the following information about a library book is invalid

The above defined schema violates one constraint viz the hyphens separating the ISBN number, The ability to test the validity of documents is an important aspect of large web applications that receive and send information to and from lots of sources. If you are receiving XML transactions over the web, you would not want to process the content into your database if it is not in the proper schema.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.