Share on Facebook Share on Twitter Email
Answers.com

XML schema

 
 

The definition of an XML document, which identifies the XML tags and includes the rules for their interrelationships; for example, there must be at least one B tag within every tag A, or there can only be B tags within an A tag, and so forth. This is like any common relationship in a database, such as each customer can be associated to order records, but not to payroll records, or each department must have one or more employees.

Residing within the document itself, an XML schema is commonly used to verify the integrity of the content. Various recommendations for an XML schema were submitted to the W3C, and a standard was approved in May 2001 that included the ability to define data by type (date, integer, etc.) just like database records. See XML, W3C XML Schema, RELAX NG, Schematron, SOX, XDR, DCD, XML-Data, DDML and XML vocabulary.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a word or phrase...
All Community Q&A Reference topics
 
Wikipedia: XML schema
Top

An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. An XML schema provides a view of the document type at a relatively high level of abstraction.

There are languages developed specifically to express XML schemas. The Document Type Definition (DTD) language, which is native to the XML specification, is a schema language that is of relatively limited capability, but that also has other uses in XML aside from the expression of schemas. Two other very popular, more expressive XML schema languages are XML Schema (W3C) and RELAX NG.

The mechanism for associating an XML document with a schema varies according to the schema language. The association may be achieved via markup within the XML document itself, or via some external means.

Contents

Validations

The process of checking to see if an XML document conforms to a schema is called validation, which is separate from XML's core concept of syntactic well-formedness. All XML documents must be well-formed, but it is not required that a document be valid unless the XML parser is "validating," in which case the document is also checked for conformance with its associated schema. DTD-validating parsers are most common, but some support W3C XML Schema or RELAX NG as well.

Documents are only considered valid if they satisfy the requirements of the schema with which they have been associated. These requirements typically include such constraints as:

  • Elements and attributes that must/may be included, and their permitted structure
  • The structure is specified by a regular expression syntax
  • How character data is to be interpreted, e.g. as a number, a date, a URL, a Boolean, etc.

XML Schema validations can be effectively performed using specialized parsers like JAXB or SAX.

XML schema languages

Capitalization

There is some confusion as to when to use the capitalized spelling "Schema" and when to use the lowercase spelling. The lowercase form is a generic term and may refer to any type of schema, including DTD, XML Schema (aka: XSD), RelaxNG, or others and should always be written using lowercase except when appearing at the start of a sentence. The form "Schema" (capitalized) in common use in the XML community always refers to W3C XML Schema.

See also

References

External links


 
 

 

Copyrights:

Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more
Wikipedia. This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "XML schema" Read more

 

Mentioned in