The Extensible Markup Language (XML) is the standard for data and documents that is finding wide acceptance in the computer industry. XML describes and provides structure to a body of data, such as a file or data packet, referred to herein as a XML entity. The XML standard provides for tags that delimit sections of a XML entity referred to as XML elements. Each XML element may contain one or more name-value pairs referred to as attributes.
By defining an element that contains attributes and descendant elements, the XML entity defines a hierarchical tree relationship between the element, its descendant elements, and its attribute. A set of elements that have such a hierarchical tree relationship is referred to herein as a XML document.
A XML schema document is a document that defines a schema for XML documents, that is, describes and constrains the contents and structure of XML documents. The description of the constraints and structure of a XML document is referred to as a XML document schema. A XML schema document may be written in a definition language for defining XML document schema. One such example is XML Schema. A draft specification, referred to hereinafter as “XML Schema Specification”, for the XML Schema definition language is described in a set of three documents published by the W3C Consortium. The first document in the set is “XML Schema Part 0: Primer Second Edition”, W3C Recommendation 28 Oct. 2004, located at “http://www.w3.org/TR/xmlschema-0/”, the entire contents of which are hereby incorporated by reference for all purposes as if fully set forth herein. The second document in the set is “XML Schema Part 1: Structures Second Edition”, W3C Recommendation 28 Oct. 2004, located at “http://www.w3.org/TR/xmlschema-1/”, the entire contents of which are hereby incorporated by reference for all purposes as if fully set forth herein. The third document in the set is “XML Schema Part 2: Datatypes Second Edition”, W3C Recommendation 28 Oct. 2004, located at “http://www.w3.org/TR/xmlschema-2/”, the entire contents of which are hereby incorporated by reference for all purposes as if fully set forth herein.
A XML document that conforms to a XML document schema may be referred to herein as either as an instance of the XML document schema and as in instance of the respective XML document schema.
An XML document schema may define parts of the XML document schema, e.g. an element or complex elements, and may define element or complex types. Each of these may be referred as an XML schema constructs or just simply schema. The XML document schema may also be referred to herein as a XML schema.
A XML document schema is used to validate XML documents. As used herein, validation refers to the process of determining whether a portion of a XML document (such as, for example, an entire XML document, a XML element included in a XML document, a sub-element of a XML element, or an attribute of a XML element) conforms to the definition and constraints specified in the relevant portion of a XML document schema. The validation of a specific portion of a XML document may return a validation result which, depending on the particular implementation, may comprise one or more values that indicate a successful or a failed validation outcome. In addition, the validation result may also comprise an overall validation outcome for a particular portion of a XML document that includes one or more sub-portions (e.g. for a XML element that includes sub-elements).
Validation is often performed whenever a XML document is loaded for storage in a repository that stores XML documents. Such repositories may store multitudes of XML documents that purport to be instances of any number of XML document schemas. When a new XML document is added to the repository, validation may be performed. Clearly, there is a need to perform the XML validation in an efficient way.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.