Namespace-based Validation Dispatching Language

Last updated

Namespace-based Validation Dispatching Language (NVDL) is an XML schema language for validating XML documents that integrate with multiple namespaces. It is an ISO/IEC standard, and it is Part 4 of the DSDL schema specification. Much of the work on NVDL is based on the older Namespace Routing Language.

Contents

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

<rulesxmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"><namespacens="http://www.w3.org/1999/xhtml"><validateschema="xhtml.rng"/></namespace><namespacens="http://www.w3.org/2000/svg/"><validateschema="svg.sch"/></namespace><anyNamespace><reject/></anyNamespace></rules>

This NVDL schema will validate the parts that use the XHTML 1.0 namespace with a RELAX NG schema, validate the parts that use the SVG 1.0 namespace with a Schematron schema, and reject the document as invalid if it encounters elements with any other namespace.

Related Research Articles

A document type definition (DTD) is a set of markup declarations that define a document type for an SGML-family markup language.

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.

DocBook is a semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware and software but it can be used for any other sort of documentation.

XSD, a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item content in a document. They can check if it adheres to the description of the element it is placed in.

In computing, RELAX NG is a schema language for XML—a RELAX NG schema specifies a pattern for the structure and content of an XML document. A RELAX NG schema is itself an XML document but RELAX NG also offers a popular compact, non-XML syntax. Compared to other XML schema languages RELAX NG is considered relatively simple.

Document Schema Definition Languages (DSDL) 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.

Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees. It is a structural schema language expressed in XML using a small number of elements and XPath.

XML Linking Language, or XLink, is an XML markup language and W3C specification that provides methods for creating internal and external links within XML documents, and associating metadata with those links.

In web development, "tag soup" is a pejorative for syntactically or structurally incorrect HTML written for a web page. Because web browsers have historically treated HTML syntax or structural errors leniently, there has been little pressure for web developers to follow published standards, and therefore there is a need for all browser implementations to provide mechanisms to cope with the appearance of "tag soup", accepting and correcting for invalid syntax and structure where possible.

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. These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.

In its simplest form, a Namespace Routing Language (NRL) schema consists of a mapping from namespace URIs to schema URIs. An NRL schema is written in XML.

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. If each vocabulary is given a namespace, the ambiguity between identically named elements or attributes can be resolved.

GRDDL is a markup format for Gleaning Resource Descriptions from Dialects of Languages. It is a W3C Recommendation, and enables users to obtain RDF triples out of XML documents, including XHTML. The GRDDL specification shows examples using XSLT, however it was intended to be abstract enough to allow for other implementations as well. It became a Recommendation on September 11, 2007.

RDFa is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents. The RDF data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents. It also enables the extraction of RDF model triples by compliant user agents.

Oxygen XML Editor multi-platform XML editor, XSLT/XQuery debugger and profiler

The Oxygen XML Editor is a multi-platform XML editor, XSLT/XQuery debugger and profiler with Unicode support. It is a Java application, so it can run in Windows, Mac OS X, and Linux. It also has a version that can run as an Eclipse plugin.

ItsNat Natural AJAX, is an open-source Java component-based Ajax framework.

eXtensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated.

gSOAP is a C and C++ software development toolkit for SOAP/XML web services and generic XML data bindings. Given a set of C/C++ type declarations, the compiler-based gSOAP tools generate serialization routines in source code for efficient XML serialization of the specified C and C++ data structures. Serialization takes zero-copy overhead.