Information technology — Document Schema Definition Languages (DSDL) — Part 5: Extensible Datatypes

ISO/IEC 19757-5:2011 specifies an XML language that allows users to create and extend datatype libraries for their own purposes. The datatype definitions in these libraries can be used by XML validators and other tools to validate content and make comparisons between values.

Technologies de l'information — Langages de définition de schéma de documents (DSDL) — Partie 5: Types de données extensibles

General Information

Status
Published
Publication Date
25-Sep-2011
Current Stage
9093 - International Standard confirmed
Start Date
26-Apr-2022
Completion Date
19-Apr-2025
Ref Project
Standard
ISO/IEC 19757-5:2011 - Information technology -- Document Schema Definition Languages (DSDL)
English language
18 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


INTERNATIONAL ISO/IEC
STANDARD 19757-5
First edition
2011-10-01
Information technology — Document
Schema Definition Languages (DSDL) —
Part 5:
Extensible Datatypes
Technologies de l'information — Langages de définition de schéma de
documents (DSDL) —
Partie 5: Types de données extensibles

Reference number
©
ISO/IEC 2011
©  ISO/IEC 2011
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56  CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
ii © ISO/IEC 2011 – All rights reserved

Contents Page
Foreword . iv
Introduction . v
1  Scope . 1
2  Normative references . 1
3  Terms and definitions . 2
4  Extensible Datatypes schema overview . 2
5  Common constructs . 3
5.1  Common types . 3
5.2  Common attributes . 4
5.3  Extension elements . 4
5.4  Versioning and compatibility . 5
6  Simplification . 5
6.1  Include elements . 5
6.2  Same-named datatypes . 6
7  Document element . 7
8  Top-level elements . 7
8.1  div element . 8
8.2  Top-level extension elements . 8
9  Datatype definition . 8
9.1  Named datatypes . 8
9.2  Anonymous datatypes . 8
9.3  Whitespace processing . 9
9.4  Mechanisms for defining datatypes . 9
Annex A (normative) RELAX NG schema for Extensible Datatypes documents . 16
Bibliography . 18

© ISO/IEC 2011 – All rights reserved iii

Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members of
ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information
technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of the joint technical committee is to prepare International Standards. Draft International
Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as
an International Standard requires approval by at least 75 % of the national bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights.
ISO/IEC 19757-5 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 34, Document description and processing languages.
ISO/IEC 19757 consists of the following parts, under the general title Information technology — Document
Schema Definition Languages (DSDL):
 Part 1: Overview
 Part 2: Regular-grammar-based validation — RELAX NG
 Part 3: Rule-based validation — Schematron
 Part 4: Namespace-based Validation Dispatching Language (NVDL)
 Part 5: Extensible Datatypes
 Part 7: Character Repertoire Description Language (CREPDL)
 Part 8: Document Semantics Renaming Language (DSRL)
 Part 9: Namespace and datatype declaration in Document Type Definitions (DTDs)
 Part 11: Schema Association
iv © ISO/IEC 2011 – All rights reserved

Introduction
This part of ISO/IEC 19757 specifies a powerful, XML-based language which enables users to create and
extend their own libraries of datatypes using straightfoward declarative XML constructs. Such libraries are
well-suited to being used in pipelining validation processes in conjunction with other XML schema languages.
[1]
Unlike W3C Schema , ISO/IEC 19757-2:2008 (RELAX NG) does not itself provide a declarative mechanism
for users to define their own datatypes. If they are not satisfied with the two built-in types of string and
token, RELAX NG users have had either to use a pre-written library bundled with their validator, or to
program a datatype library using that validator's API. Such programmed datatype libraries are hard to
construct for non-programmer users, and built-in datatype libraries are often insufficient for users' needs.

© ISO/IEC 2011 – All rights reserved v

INTERNATIONAL STANDARD ISO/IEC 19757-5:2011(E)

Information technology — Document Schema Definition
Languages (DSDL) —
Part 5:
Extensible Datatypes
1 Scope
This part of ISO/IEC 19757 specifies an XML language that allows users to create and extend datatype
libraries for their own purposes. The datatype definitions in these libraries can be used by XML validators and
other tools to validate content and make comparisons between values.
2 Normative references
The following referenced documents are indispensable for the application of this document. For dated
references, only the edition cited applies. For undated references, the latest edition of the referenced
document (including any amendments) applies.
IETF RFC 3023, XML Media Types, Internet Standards Track Specification, January
2001, http://www.ietf.org/rfc/rfc3023.txt
IETF RFC 3987, Internationalized Resource Identifiers (IRIs), Internet Standards Track Specification, January
2005, http://www.ietf.org/rfc/rfc3987.txt
ISO/IEC 19757-2:2008, Information technology — Document Schema Definition Language (DSDL) — Part 2:
Regular-grammar-based validation — RELAX NG
W3C XML, Extensible Markup Language (XML) 1.0 (Fourth Edition), W3C Recommendation, 16 August 2006,
edited in place 29 September 2006, http://www.w3.org/TR/2006/REC-xml-20060816
W3C XML Names, Namespaces in XML 1.0 (Third Edition), W3C Recommendation, 8 December
2009, http://www.w3.org/TR/2009/REC-xml-names-20091208/
W3C XPath 2.0, XML Path Language (XPath) 2.0, W3C Recommendation, 23 January
2007, http://www.w3.org/TR/2007/REC-xpath20-20070123/
W3C XPath 2.0 Functions, XQuery 1.0 and XPath 2.0 Functions and Operators, W3C Recommendation, 23
January 2007, http://www.w3.org/TR/2007/REC-xpath-functions-20070123/
W3C XSLT 2.0, XSL Transformations (XSLT) Version 2.0, W3C Recommendation, 23 January
2007, http://www.w3.org/TR/2007/REC-xslt20-20070123/
W3C XLink 1.0, XML Linking Language (XLink) Version 1.0, W3C Recommendation, 27 June
2001, http://www.w3.org/TR/2001/REC-xlink-20010627/
© ISO/IEC 2011 – All rights reserved 1

3 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
3.1
candidate value
some character data in an XML document that is to have its datatype tested
3.2
datatype
named property of sequences of character data that validate against datatype definitions as described by this
part of ISO/IEC 19757
3.3
datatype definition
formal specification of constraints upon XML character data for the datatype being defined
3.4
datatype library
collection of datatype definitions that share the same XML Namespace
3.5
Extensible Datatypes document
XML document which is valid to the normative schema presented in this part of ISO/IEC 19757, and which
conforms to its provisions
3.6
forwards-compatible mode
operating mode in which an implementation ignores language constructs which are labelled as having a
version later than that understood by the implementation, unless they are explicitly labelled as requiring
processing
3.7
implementation
Extensible Datatypes implementation that conforms to this part of ISO/IEC 19757
3.8
extended implementation
implementation that conforms to this part of ISO/IEC 19757, and which provides additional functionality
provided by the extension mechanisms of Extensible Datatypes
4 Extensible Datatypes schema overview
The schema for Extensible Datatypes is interspersed as fragments within the narrative text of this part of
ISO/IEC 19757 and appears rendered against a grey background. The schema language used is the compact
syntax of RELAX NG, as defined by Annex C of ISO/IEC 29500:2008.
Concatenating the schema fragments in this part of ISO/IEC 19757 gives a RELAX NG schema that
normatively defines the grammar of Extensible Datatypes. The consolidated schema is shown in Annex A.
NOTE 1 Throughout, as per ISO/IEC 19757-2:2008, RELAX NG compact syntax keywords used as identifiers in the
schema are prefixed with the "\" character.
NOTE 2 The null Namespace is bound to the prefix "local" so that it can be referenced later in the schema.
default namespace dt =
"http://purl.oclc.org/dsdl/extensible-datatypes"
namespace local = ""
2 © ISO/IEC 2011 – All rights reserved

Datatype libraries are defined in ISO/IEC 19757-2:2008 as being identified by an IRI, with each datatype
within a given datatype library being identified by a NCName. An Extensible Datatypes document presents
one or more such datatype libraries to implementations. Each datatype definition has a qualified name; the
Namespace IRI identifies the datatype library to which the datatype belongs, and the local part identifies the
name of the datatype within that datatype library.
5 Common constructs
5.1 Common types
5.1.1 XPath expressions
W3C XPath 2.0 expressions are used to bind values to variables or properties and to express tests in
conditions. Conforming implementations of Extensible Datatypes shall additionally implement the following
functions from W3C XSLT 2.0:
— document (W3C XSLT 2.0, section 16.1)
— format-number (W3C XSLT 2.0, section 16.4)
— function-available (W3C XSLT 2.0, section 18.1.1)
These functions shall be callable within implementations using unqualified function names.
NOTE The function-available function can be used to test for the availability of XPath extension functions for the
purposes of enhanced validation in extended implementations.
XPath = text
The context node for evaluating XPath expressions in Extensible Datatypes is a text node that is the only child
of a root node, and whose value is the whitespace-normalized candidate value. The context position and
context size are both 1. The set of variable bindings are the in-scope variables, as defined at 9.4.1. The set of
namespace declarations that are in-scope for the expression are those that are in-scope for the element on
which the XPath is given.
5.1.2 Boolean values
Where a boolean value is to be specified, the literal strings "true" and "false" are used.
boolean = "true" | "false"
5.1.3 Regular expressions
Regular expressions are defined in W3C XPath 2.0.
regular-expression = text
5.1.4 Arbitrary content
Extensible Datatypes document are governed by an open schema which, for purposes of extensibility, allows
arbitrary content to occur at certain points. Such content can be any XML content other than elements or
attributes associated with the Extens
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.