Overview
ISO/IEC 19757-5:2011 - Extensible Datatypes defines an XML-based language for creating and extending datatype libraries used by XML validators and related tools. Part of the DSDL (Document Schema Definition Languages) family, this standard provides a declarative way for schema authors to define datatype constraints, comparisons and validation logic that can be reused across schemas and validation pipelines.
Key attributes of the standard:
- XML grammar (RELAX NG compact fragments are provided; consolidated schema in Annex A)
- Declarative datatype definitions grouped into datatype libraries identified by IRIs
- Designed to work alongside RELAX NG and other DSDL parts for richer validation
Key topics and technical requirements
- Datatype libraries and definitions: Datatypes are named (NCName) within a library identified by an IRI (Namespace). Each definition describes constraints on character data.
- XML language and schema: The normative grammar is expressed using RELAX NG compact syntax (Annex A). Extensible Datatypes documents must conform to this grammar.
- XPath 2.0 expressions: W3C XPath 2.0 expressions are used to bind values, express tests and conditions. Implementations must support selected XSLT 2.0 functions (document, format-number, function-available) callable by unqualified names.
- Whitespace and evaluation context: XPath evaluation uses a whitespace-normalized candidate value in a text-node context; context position/size are 1.
- Extensibility mechanisms:
- Extension elements and attributes: Elements/attributes in non-Extensible-Datatypes namespaces are allowed for extended implementations; they must not change base behaviour if ignored.
- Include elements: Import/redefine datatypes from other libraries via an href IRI; ns attribute can override imported namespaces.
- Versioning and forwards-compatibility: Elements carry a version attribute (standard version is "1.0"); constructs with later versions can be ignored unless marked must-implement="true".
- Simplification rules: Documents are simplified before validation by resolving includes and merging same-named datatype definitions.
- Normative references: RFC 3023, RFC 3987, ISO/IEC 19757-2 (RELAX NG), W3C XML, XML Namespaces, XPath 2.0, XSLT 2.0, XLink.
Applications and who uses it
ISO/IEC 19757-5 is practical for:
- Schema authors who need custom datatypes beyond built-in string/token types
- XML validator and tool vendors implementing datatype libraries and runtime binding
- Systems integrators building validation pipelines combining RELAX NG, Schematron, NVDL and datatype checks
- Document processing applications that require precise value comparison, formatting or type-specific validation (dates, numbers, identifiers) via reusable libraries
Using Extensible Datatypes simplifies sharing datatype semantics across projects and tools, reduces custom programming for datatype APIs, and enables non-programmer authors to declare strong typing for XML content.
Related standards
- ISO/IEC 19757-2:2008 (RELAX NG) - regular-grammar-based validation
- ISO/IEC 19757 (DSDL family), including NVDL (Part 4) and Schematron (Part 3)
- W3C XPath 2.0 / XSLT 2.0 and relevant IETF RFCs (RFC 3023, RFC 3987)