Information technology - Document Schema Definition Languages (DSDL) - Part 8: Document Semantics Renaming Language (DSRL)

ISO/IEC 19757-8:2008 specifies a mechanism that allows users to assign locally meaningful names to XML elements, attributes, entities and processing instructions, without having to completely rewrite the Document Type Definition (DTD) or schema against which they are to be validated. In addition, ISO/IEC 19757-8:2008 provides an XML-based format for declaring the replacement text for entity references and provides a mechanism that allows users to define default values for both element content and attribute values.

Technologies de l'information — Langages de définition de schéma de documents (DSDL) — Partie 8: Langage pour renommer une sémantique de documents (DSRL)

General Information

Status
Published
Publication Date
02-Dec-2008
Current Stage
9093 - International Standard confirmed
Start Date
12-Sep-2024
Completion Date
30-Oct-2025
Ref Project

Relations

Overview

ISO/IEC 19757-8:2008 defines the Document Semantics Renaming Language (DSRL), part of the DSDL family, to let users remap XML/SGML element names, attribute names, entities and processing-instruction targets to the names expected by an existing schema or DTD. DSRL lets you apply locally meaningful names without rewriting the original document model, declare replacement text for entity references, and specify default element content and attribute values. The DSRL namespace IRI is: http://purl.oclc.org/dsdl/dsrl.

Key topics and technical requirements

  • DSRL maps: The top-level container is the dsrl:maps element. It can record optional attributes such as targetNamespace and targetSchemaLocation to identify the validating schema.
  • Name mapping rules: Rules map user-defined names (elements, attributes, processing instructions) to schema-defined names using elements such as dsrl:element-map, dsrl:attribute-map, dsrl:from and dsrl:to.
  • Defaulting: Mechanisms to declare default element content and default attribute values so documents can be completed before validation.
  • Entity handling: XML-based declarations for replacement text of entity references and optional entity-name mapping.
  • Namespace awareness: Mappings may use qualified names (QNames) and namespace declarations to ensure precise association with IRIs.
  • Conversion: Support for converting attribute values to element content where target schemas do not use attributes.
  • Validation and conformance: Annexes provide RELAX NG schemas (and Schematron rules) for validating DSRL maps and guidance on conformance.

Applications and who uses it

  • XML architects and schema designers who need to validate heterogeneous or legacy documents against a single authoritative schema.
  • Systems integrators and data migration teams mapping vendor-specific XML vocabularies to standard models without rewriting schemas.
  • Digital archivists and publishers applying local terminology while preserving conformity to preservation or interchange schemas.
  • Developers building validation pipelines that combine DSRL with RELAX NG, Schematron or NVDL to preprocess documents before validation.
  • Automated transformation and normalization workflows where entity replacement and default values are required prior to schema-based validation.

Related standards

  • ISO/IEC 19757 (DSDL) family - especially Part 2 (RELAX NG), Part 3 (Schematron), Part 4 (NVDL) and Part 9 (DTD namespace/datatype declarations).
  • W3C standards cited by the standard: XML, XML Namespaces, XML Infoset, and XSLT 2.0 (for transformations referenced in informative annexes).

DSRL is practical when you need robust, namespace-aware name remapping, entity replacement and defaulting as part of a standardized XML validation workflow. Keywords: ISO/IEC 19757-8:2008, DSRL, DSDL, XML mapping, schema validation, entity replacement, default values.

Standard
ISO/IEC 19757-8:2008 - Information technology — Document Schema Definition Languages (DSDL) — Part 8: Document Semantics Renaming Language (DSRL) Released:12/3/2008
English language
20 pages
sale 15% off
Preview
sale 15% off
Preview

Frequently Asked Questions

ISO/IEC 19757-8:2008 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Document Schema Definition Languages (DSDL) - Part 8: Document Semantics Renaming Language (DSRL)". This standard covers: ISO/IEC 19757-8:2008 specifies a mechanism that allows users to assign locally meaningful names to XML elements, attributes, entities and processing instructions, without having to completely rewrite the Document Type Definition (DTD) or schema against which they are to be validated. In addition, ISO/IEC 19757-8:2008 provides an XML-based format for declaring the replacement text for entity references and provides a mechanism that allows users to define default values for both element content and attribute values.

ISO/IEC 19757-8:2008 specifies a mechanism that allows users to assign locally meaningful names to XML elements, attributes, entities and processing instructions, without having to completely rewrite the Document Type Definition (DTD) or schema against which they are to be validated. In addition, ISO/IEC 19757-8:2008 provides an XML-based format for declaring the replacement text for entity references and provides a mechanism that allows users to define default values for both element content and attribute values.

ISO/IEC 19757-8:2008 is classified under the following ICS (International Classification for Standards) categories: 35.240.30 - IT applications in information, documentation and publishing. The ICS classification helps identify the subject area and facilitates finding related standards.

ISO/IEC 19757-8:2008 has the following relationships with other standards: It is inter standard links to ISO 13017:2012/Amd 1:2015. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.

You can purchase ISO/IEC 19757-8:2008 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.

Standards Content (Sample)


INTERNATIONAL ISO/IEC
STANDARD 19757-8
First edition
2008-12-15
Information technology — Document
Schema Definition Languages (DSDL) —
Part 8:
Document Semantics Renaming
Language (DSRL)
Technologies de l'information — Langages de définition de schéma de
documents (DSDL) —
Partie 8: Langage pour renommer une sémantique de documents
(DSRL)
Reference number
©
ISO/IEC 2008
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.

©  ISO/IEC 2008
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 2008 – All rights reserved

Contents Page
Foreword. iv

Introduction. v

1 Scope. 1

2 Normative references. 1

3 Terms and definitions. 2

4 The role of the Document Semantics Renaming Language. 2

4.1 Namespace. 2

5 DSRL maps. 3

6 Mapping user-defined names to schema-defined names. 3
6.1 Reassigning element and attribute names. 3

6.2 Mapping attribute values. 5
6.3 Default attribute values. 6

6.4 Mapping element content. 6
6.5 Default content. 6

6.6 Renaming processing instruction targets. 7
6.7 Mapping entity references. 7

7 Declaring entities. 8
8 Conformance. 9
Annex A (normative) Validation of declarative document architectures. 10
A.1 RELAX NG XML Schema for Validating DSRL. 10
A.2 RELAX NG Compact Schema for Validating DSRL maps. 15
A.3 Schematron Rules for Validating DSRL. 16
Annex B (informative) Using DSRL to Transform Document Instances. 17

Bibliography . 20
© ISO/IEC 2008 – 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-8 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 7: Character Repertoire Description Language (CRDL)
— Part 8: Document Semantics Renaming Language (DSRL)
— Part 9: Namespace and datatype declaration in Document Type Definitions (DTDs)

iv © ISO/IEC 2008 – All rights reserved

Introduction
ISO/IEC 19757 defines a set of Document Schema Definition Languages (DSDL) that can be used to specify one or
more validation processes performed against Extensible Markup Language (XML) or Standard Generalized Markup
Language (SGML) documents. (XML is an application profile of SGML, ISO 8879:1986.)
A document model is an expression of the constraints to be placed on the structure and content of documents to be
validated with the model. A number of technologies have been developed through various formal and informal consortia
since the development of Document Type Definitions (DTDs) as part of ISO 8879, notably by the World Wide Web
Consortium (W3C) and the Organization for the Advancement of Structured Information Standards (OASIS). A number
of validation technologies are standardized in DSDL to complement those already available as standards or from
industry.
To validate that a structured document conforms to specified constraints in structure and content relieves the potentially
many applications acting on the document from having to duplicate the task of confirming that such requirements
have been met. Historically, such tasks and expressions have been developed and utilized in isolation, without
consideration for how the features and functionality available in other technologies might enhance validation objectives.
The primary objective of ISO/IEC 19757 is to bring together different validation-related tasks and expressions to form
a single extensible framework that allows technologies to work in series or in parallel to produce a single or a set of
validation results. The extensibility of DSDL accommodates validation technologies not yet designed or specified.
In the past, different design and use criteria have led users to choose different validation technologies for different
portions of their information. Bringing together information within a single XML document sometimes prevents existing
document models from being used to validate sections of data. By providing an integrated suite of constraint description
languages that can be applied to different subsets of a single XML document, ISO/IEC 19757 allows different validation
technologies to be integrated under a well-defined validation policy.
ISO/IEC 19757 integrates constraint description technologies into a suite that
— provides user control of names, order and repeatability of information objects (elements),
— allows users to identify restrictions on the co-concurrence of elements and/or element contents,
— allows specific subsets of structured documents to be validated,
— allows restrictions to be placed on the contents of specific elements, including restrictions based on the content
of other elements in the same document,
— allows the character set that can be used within specific elements to be managed, based on the application of
the ISO/IEC 10646 Universal Multiple-Octet Coded Character Set (UCS),
— allows default values to be assigned to element content and attribute values,
— allows SGML to be used to declare document structure constraints that extend DTDs to include functions such
as namespace-controlled validation and datatypes.
© ISO/IEC 2008 – All rights reserved v

INTERNATIONAL STANDARD ISO/IEC 19757-8:2008(E)

Information technology — Document Schema Definition
Languages (DSDL) —
Part 8:
Document Semantics Renaming Language (DSRL)
1 Scope
This part of ISO/IEC 19757 specifies a mechanism that allows users to assign locally meaningful names to
XML elements, attributes, entities and processing instructions, without having to completely rewrite the DTD or
schema against which they are to be validated. In addition, this part of ISO/IEC 19757 provides an XML-based
format for declaring the replacement text for entity references and provides a mechanism that allows users to
define default values for both element content and attribute 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.
NOTE Each of the following documents that is not an International Standard has a unique identifier that is used to
cite the document in the text. The unique identifier consists of the part of the reference up to the first comma.
IRI, IETF RFC 3987, Internationalized Resource Identifiers (IRIs), Internet Standards Track Specification,
January 2005, http://www.ietf.org/rfc/rfc3987.txt
ISO/IEC 19757-2:2003, Information technology — Document Schema Definition Language (DSDL) — Part 2:
Regular-grammar-based validation — RELAX NG
ISO/IEC 19757-2:2003/Amd.1:2006, Information technology — Document Schema Definition Language
(DSDL) — Part 2: Regular-grammar-based validation — RELAX NG — Amendment 1: Compact Syntax
ISO/IEC 19757-3:2006, Information technology — Document Schema Definition Languages (DSDL) — Part 3:
Rule-based validation — Schematron
ISO 8879:1986, Information processing — Text and office systems — Standard Generalized Markup
Language (SGML)
XML, Extensible Markup Language (XML) 1.0 (Fourth Edition), W3C Recommendation, 16 August 2006,
http://www.w3.org/TR/2006/REC-xml-20060816
XML-Infoset, XML Information Set (Second Edition), W3C Recommendation, 4 February 2004,
http://www.w3.org/TR/2004/REC-xml-infoset-20040204
XML-Names, Namespaces in XML 1.0 (Second Edition), W3C Recommendation, 16 August 2006,
http://www.w3.org/TR/2006/REC-xml-names-20060816
XML Schema, XML Schema Part 1: Structures Second Edition, W3C Recommendation, 28 October 2004,
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/
XSD, XML Schema Part 2: Datatypes Second Edition, W3C Recommendation, 28 October 2004,
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/
XSLT 2.0, XSL Transformations (XSLT) Version 2.0, W3C Recommendation, 23 January 2007,
http://www.w3.org/TR/2007/REC-xslt20-20070123/
© ISO/IEC 2008 – All rights reserved 1

3 Terms and definitions
For the purposes of this document, the terms and definitions given in ISO/IEC 19757-2, ISO/IEC 19757-3
and the following apply.
3.1
DSRL map
set of rules that is used to map a document instance to a document model defined by one or more schemas

3.2
entity
ISO 8879:1986 general entity that can be referenced using an XML entity reference

3.3
entity node
node in a Document Object Model that identifies an entity and, where appropriate, contains details of its replacement
text
3.4
IRI
Internationalized Resource Identifiers as defined in IETF RFC 3987
3.5
SGML
Standard Generalized Markup Language defined in ISO 8879:1986
4 The role of the Document Semantics Renaming Language
The Document Semantics Renaming Language (DSRL) provides a mechanism for declaring how an application can
map locally meaningful element, attribute, entity and processing instruction names to the names assigned to equivalent
XML elements, attributes, entities and processing instructions within a document model without having to completely
rewrite the DTD or schema to which they are required to conform.
In addition, DSRL provides an XML-based format for declaring the replacement text for entity references and provides
a mechanism that allows users to define default values for both element content and attribute values. To allow for
schemas that do not support the use of attributes, DSRL also allows users to convert attribute values to element
content.
4.1 Namespace
Elements and attributes that conform to this Part of DSDL shall have an XML namespace definition (as defined in
XML-Names) whose associated resource identifier (IRI) is:
http://purl.oclc.org/dsdl/dsrl
In this Part the prefix dsrl: is used to identify points at which this IRI defines the namespace.
NOTE: In most applications of DSRL this namespace prefix will not be required as the IRI can be assigned as the default XML
namespace.
Other namespaces required to group elements and attributes into processable units can be assigned as required for
validation.
2 © ISO/IEC 2008 – All rights reserved

5 DSRL maps
The outermost element of a DSRL map has the following structure:

...

Two optional attributes can be associated with this element:
— targetNamespace may be used to record the IRI assigned as the target namespace for the validating schema;
— targetSchemaLocation may be used to record the IRI assigned to the schema to be used to validate the
mapped document instances.
The targetNamespace attribute is required when the schema identified by the targetSchemaLocation attribute
has a target namespace.
NOTE: The targetSchemaLocation attribute can be used to provide a specific location for the schema to be used for the
validation of the result document. If there is no requirement to validate both the optional attributes can be omitted. If
a null value is present for targetSchemaLocation the DTD to be used to validate it is presumed to be part of the
document. If a namespace is declared but no schema location is stated the namespace is mapped against an empty
string.
The formal declaration for this element, defined using the RELAX NG Compact Syntax, is:
namespace xsd="http://www.w3.org/2001/XMLSchema-datatypes"
namespace dsrl="http://purl.oclc.org/dsdl/dsrl"
maps = element dsrl:maps
{target-namespace?, schema-location?,
(element-map | attribute-map | map-pi-target )+,
entity-name-map?, define-entity*
}
target-namespace = attribute targetNamespace {xsd:anyURI}
schema-location = attribute targetSchemaLocation {xsd:anyURI}
NOTE: Support for the optional entity-name-map component is a conformance issue (see Clause 8).
6 Mapping user-defined names to schema-defined names
6.1 Reassigning element and attribute names
The dsrl:element-map element is used to record replacements that apply to element names and to their associated
attributes. The model for this element is:
element-map = element dsrl:element-map (parent?, (name | name-map),
attribute-map*, default-content?)
parent = element dsrl:parent { text }
name = element dsrl:name { added-attribute*, xsd:QName }
added-attribute = attribute additional { xsd:boolean }
name-map = { (from, to) }
from = element dsrl:from { text }
to = element dsrl:to { text }
The contents of a dsrl:element-map element consists of a sequence of elements that define which name in a
document instance is to be matched to which element in the validation schema, and which attributes of the element
are to be mapped. Optionally default content can also be defined for the element.
The name of the element to be mapped is recorded in the content of the dsrl:from element. This content shall be
a valid XML name, which can include a prefix that identifies the appropriate namespace. If the content is a prefixed
© ISO/IEC 2008 – All rights reserved 3

name, it is recommended that the prefix used be declared in a namespace declaration that is declared as an attribute
of the dsrl:from element.
NOTE: If the namespace is declared within the definition of the dsrl:from element you can be certain that the association
of the name with the referenced IRI is correctly recorded. This makes it easier to reuse the definition safely, and can
make processing easier.
If the named element needs to be replaced in different ways in different contexts the optional dsrl:parent element
can be used to record XML Stylesheet Langauge Transformation (XSLT) patterns that distinguish between the different
contexts in which replacement of the name is to be applied. No two dsrl:element-map elements shall have identical
contents for both their dsrl:parent element and their dsrl:from element. If two or more maps with different
contents match the same result path the last of matches shall be applied.
NOTE: This precedence rule allows the XSLT error recovery rule for matching paths using the last template defined to be
applied when processing DSRL using XSLT.
The name to be applied to the mapped element when it is validated is recorded as the content of the dsrl:to element.
This content shall be a valid XML name, which can include a prefix that identifies the appropriate namespace. If the
content is a prefixed name, it is recommended that the prefix used be declared in a namespace declaration that is
declared as an attribute of the dsrl:to element.
If the element name is to stay the same, but one or more attributes of the element is to have its name or values
mapped, the dsrl:name element can be used in place of the dsrl:from and dsrl:to pair. The content of a
dsrl:name element shall be a valid XML name, which can include a prefix that identifies the appropriate namespace.
Names can be qualified providing the relevant namespace prefixes have been declared within the map. They cannot
contain spaces, or any other character that is not a valid name character as defined in the W3C XML specification.
The contents of the dsrl:parent element shall form a valid XSLT pattern that identifies a permitted parent for the
element to be renamed.
NOTE: A typical example of a DSRL element name map for which no attribute mapping is required would be:

adresse
address

If namespaces are used for the source or result element they should be declared as part of the definition, giving the declaration
the form:

old:name
new:name

The dsrl:attribute-map element is used within dsrl:element-map elements to record replacements that
apply to attribute names and values. The model for this element is:
attribute-map = element dsrl:attribute-map {(name | attribute-name-map),
values-map?, default-value?}
attribute-name-map = (from, (to|to-element))
to-element = element dsrl:to-element { text }
Each dsrl:attribute-map replaces a single attribute. The name of the attribute to be mapped is recorded as the
content of the dsrl:from element. No two dsrl:attribute-map elements within a given dsrl:element-map
shall have the same value for their dsrl:from element.
4 © ISO/IEC 2008 – All rights reserved

If the attribute is to be directly mapped to an attribute in the result document, the name to be applied to the mapped
attribute when it is validated is recorded as the contents of the immediately following dsrl:to element. If the dsrl:to
element is empty the attribute named in the dsrl:from element is to be removed prior to validation.
If the attribute is to be mapped to an element in the result document that is to precede any existing contents of the
element containing the mapped attribute, the name to be applied to the mapped element when it is validated is
recorded as the contents of the immediately following dsrl:to-element element. It is an error if both a dsrl:to
and dsrl:to-element occur in the same attribute map.
If the values of an attribute are to be mapped without the name of the attribute changing a dsrl:name element can
be used in place of the dsrl:from and dsrl:to pair.
If an attribute that is not in the source document is required to be present for document instances to be validated
against a target schema the dsrl:name element shall be assigned an additional="true" boolean attribute.
NOTE: If the additional="true" is present a default value shall be assigned to the attribute using the mechanisms specified
in 6.3.
If the attribute map is defined as child of a dsrl:maps element, rather than a dsrl:element-map element, the
attribute map will be applied to all elements that have an attribute of that name for which a specific mapping has not
been declared.
Attribute names can be qualified providing the relevant namespace prefixes have been declared within the map. They
cannot contain spaces, or any other character that is not a valid name character as defined in the W3C XML
specification.
NOTE: A typical example of a DSRL attribute name map which could be nested with the dsrl:element-map example shown
above is:

sorte
type

6.2 Mapping attribute values
A mapping can be declared between attribute values in a source document and attribute values in a target schema.
The model for the dsrl:values-map element that is nested within the appropriate dsrl:attribute-map element
is:
values-map = element dsrl:values-map {name-map+}
The value to be mapped is recorded as the content of a dsrl:from element. No two dsrl:from elements within
the same dsrl:values-map element can have identical content. If two or more dsrl:from elements with different
contents refer to the same result path the last of matches shall be applied.
NOTE: This allows the default XSLT rules for matching paths using the last template to be defined to be applied when processing
DSRL using XSLT.
The value to be assigned to the mapped attribute when it is validated is recorded as the contents of the associated
dsrl:to element.
NOTE: A typical example of a DSRL attribute values map is:

maisonhome
bureauoffice

© ISO/IEC 2008 – All rights reserved 5

6.3 Default attribute values
A dsrl:default-value element can be used to define a default value for an attribute at the end of an attribute
map. The model for this element is:
default-value = element dsrl:default-value {text}
The default value to be assigned is recorded as the contents of the dsrl:default-value element. Any value
assigned to the named attribute within the document instance will be used during validation of the document, but if
the attribute is not present the default value will be applied.
If an attribute has been declared to be an additional attribute by the addition of an additional="true" attribute
to a dsrl:name element the attribute map shall contain a dsrl:default-value element.
NOTE: A typical example of a DSRL default attribute value definition, as introduced as the last element in an
dsrl:attrib
...

Questions, Comments and Discussion

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

Loading comments...