Namespace-based Validation Dispatching Language
Encyclopedia
Namespace-based Validation Dispatching Language (NVDL) is an XML schema
XML schema
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...

 language for validating
XML Validation
XML validation is the process of checking a document written in XML to confirm that it is both "well-formed" and also "valid" in that it follows a defined structure. A "well-formed" document follows the basic syntactic rules of XML, which are the same for all XML documents...

 XML documents that integrate with multiple namespaces
XML Namespace
xmlns tagged XML namespaces are used for providing uniquely named elements and attributes in an XML document. They are defined in a W3C recommendation. An XML instance may contain element or attribute names from more than one XML vocabulary...

. It is an ISO
International Organization for Standardization
The International Organization for Standardization , widely known as ISO, is an international standard-setting body composed of representatives from various national standards organizations. Founded on February 23, 1947, the organization promulgates worldwide proprietary, industrial and commercial...

/IEC
International Electrotechnical Commission
The International Electrotechnical Commission is a non-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies – collectively known as "electrotechnology"...

 standard, and it is Part 4 of the DSDL
Document Schema Definition Languages
Document Schema Definition Languages is a framework within which multiple validation tasks of different types can be applied to an XML document in order to achieve more complete validation results than just the application of a single technology....

 schema specification. Much of the work on NVDL is based on the older Namespace Routing Language
Namespace Routing Language
In its simplest form, a Namespace Routing Language schema consists of a mapping from namespace URIs to schema URIs. An NRL schema is written in XML.DSDL Part 4 , NVDL is based on NRL.- External links :**...

.

Validation

Most XML languages are based on a single XML namespace. The expectation in these cases is that XML elements in a particular namespace belong to that language, and elements in another namespace belong to another language. Many XML languages allow the use of arbitrary elements from other namespaces.

The problem arises during the attempt to validate these hybrid documents. Each language is defined by a specific XML schema, but there is no linkage between the schemas.

The purpose of NVDL is to provide that linkage, based on namespaces. By associating a schema validator with an NVDL schema, the validator can use multiple schemas to validate a single document, switching between them based on the namespaces used in that document.

Format

NVDL documents contain a list of rules, each of which has one or more actions to take when that rule is true. Rules include a specific namespace and a mode setting. NVDL recognizes the mode as a particular piece of state that changes as the document is processed.

Actions occur when a rule is true. Actions can include validating a schema, declaring the instance document invalid, accepting this part of the instance document as valid, and continue validating as the parent did. Actions can also change the current NVDL mode. Multiple actions can be taken when a rule is true; this allows for validating a section of the instance document with multiple schemas of a different type.

Example















This NVDL schema will validate the parts that use the XHTML 1.0 namespace with a RELAX NG
RELAX NG
In computing, RELAX NG is a schema language for XML, based on Murata Makoto's RELAX and James Clark's TREX. A RELAX NG schema specifies a pattern for the structure and content of an XML document...

 schema, validate the parts that use the SVG 1.0 namespace with a Schematron
Schematron
In markup languages, Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees...

schema, and reject the document as invalid if it encounters elements with any other namespace.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK