Geographic information — XML schema implementation — Part 1: Encoding rules

This document defines XML based encoding rules for conceptual schemas specifying types that describe geographic resources. The encoding rules support the UML profile as used in the UML models commonly used in the standards developed by ISO/TC 211. The encoding rules use XML schema for the output data structure schema. The encoding rules described in this document are not applicable for encoding UML application schema for geographic features (see ISO 19136 for those rules).

Information géographique — Implémentation de schémas XML — Partie 1: Règles de codage

General Information

Status
Published
Publication Date
24-Feb-2019
Current Stage
9060 - Close of review
Due Date
13-Jun-2022
Ref Project

RELATIONS

Buy Standard

Technical specification
ISO/TS 19139-1:2019 - Geographic information -- XML schema implementation
English language
40 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (sample)

TECHNICAL ISO/TS
SPECIFICATION 19139-1
First edition
2019-03
Geographic information — XML
schema implementation —
Part 1:
Encoding rules
Reference number
ISO/TS 19139-1:2019(E)
ISO 2019
---------------------- Page: 1 ----------------------
ISO/TS 19139-1:2019(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO 2019

All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may

be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting

on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address

below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO 2019 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/TS 19139-1:2019(E)
Contents Page

Foreword ..........................................................................................................................................................................................................................................v

Introduction ................................................................................................................................................................................................................................vi

1 Scope ................................................................................................................................................................................................................................. 1

2 Normative references ...................................................................................................................................................................................... 1

3 Terms and definitions ..................................................................................................................................................................................... 1

4 Symbols and abbreviated terms ........................................................................................................................................................... 2

4.1 Abbreviated terms ............................................................................................................................................................................... 2

4.2 Namespace abbreviations ............................................................................................................................................................. 2

4.3 UML model stereotypes................................................................................................................................................................... 3

4.3.1 Overview of UML model stereotypes ............................................................................................................. 3

4.3.2 Stereotypes of classes .................................................................................................................................................. 3

4.3.3 Stereotypes of attributes .......................................................................................................................................... 3

4.3.4 Stereotypes of links ....................................................................................................................................................... 3

4.3.5 Stereotypes of packages ............................................................................................................................................ 4

5 Conformance ............................................................................................................................................................................................................. 4

6 Requirements for encoding ....................................................................................................................................................................... 4

6.1 Overview of requirements ............................................................................................................................................................ 4

6.2 Rule-based .................................................................................................................................................................................................. 4

6.3 Quality ............................................................................................................................................................................................................ 5

6.4 Web implementations ....................................................................................................................................................................... 5

6.5 Use of external XML implementations ............................................................................................................................... 5

6.6 Polymorphism ......................................................................................................................................................................................... 5

7 Encoding rules ........................................................................................................................................................................................................ 5

7.1 Overview of encoding rules ......................................................................................................................................................... 5

7.2 Default encoding .................................................................................................................................................................................... 6

7.2.1 XML class type (XCT) ........................................................................................................................................... ......... 6

7.2.2 XML Class Global Element (XCGE) .................................................................................................................... 8

7.2.3 The XML Class Property Type (XCPT) ........................................................................................................... 9

7.3 Special case encodings ..................................................................................................................................................................10

7.3.1 Overview of special case encodings .............................................................................................................10

7.3.2 Abstract classes ..............................................................................................................................................................11

7.3.3 Inheritance and sub-class encodings ..........................................................................................................12

7.3.4 Enumeration encodings ..........................................................................................................................................15

7.3.5 CodeList encoding .......................................................................................................................................................17

7.3.6 Union encoding ..............................................................................................................................................................19

7.3.7 Encoding of MetaClasses ........................................................................................................................................21

7.3.8 Encoding of externally identified implementations .......................................................................22

7.4 XML Namespace package encoding ...................................................................................................................................29

7.5 XML schema package encoding .............................................................................................................................................29

8 Additional encodings ....................................................................................................................................................................................32

9 Encoding for modularity and reuse ...............................................................................................................................................32

9.1 UML packages and XML namespaces ...............................................................................................................................32

9.2 UML model for XML implementation ...............................................................................................................................32

9.3 Implementation Approach for Decoupling XML Packages .............................................................................33

9.3.1 Overview ..............................................................................................................................................................................33

9.3.2 Implementation Approach Rules ....................................................................................................................33

9.3.3 Example of Decoupling ............................................................................................................................................35

Annex A (normative) Abstract test suite .......................................................................................................................................................38

Annex B (informative) Backward compatibility ....................................................................................................................................39

© ISO 2019 – All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/TS 19139-1:2019(E)

Bibliography .............................................................................................................................................................................................................................40

iv © ISO 2019 – All rights reserved
---------------------- Page: 4 ----------------------
ISO/TS 19139-1:2019(E)
Foreword

ISO (the International Organization for Standardization) is a worldwide federation of national standards

bodies (ISO member bodies). The work of preparing International Standards is normally carried out

through ISO technical committees. Each member body interested in a subject for which a technical

committee has been established has the right to be represented on that committee. International

organizations, governmental and non-governmental, in liaison with ISO, also take part in the work.

ISO collaborates closely with the International Electrotechnical Commission (IEC) on all matters of

electrotechnical standardization.

The procedures used to develop this document and those intended for its further maintenance are

described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the

different types of ISO documents should be noted. This document was drafted in accordance with the

editorial rules of the ISO/IEC Directives, Part 2 (see www .iso .org/directives).

Attention is drawn to the possibility that some of the elements of this document may be the subject of

patent rights. ISO shall not be held responsible for identifying any or all such patent rights. Details of

any patent rights identified during the development of the document will be in the Introduction and/or

on the ISO list of patent declarations received (see www .iso .org/patents).

Any trade name used in this document is information given for the convenience of users and does not

constitute an endorsement.

For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and

expressions related to conformity assessment, as well as information about ISO's adherence to the

World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see www .iso

.org/iso/foreword .html.

This document was prepared by Technical Committee ISO/TC 211, Geographic information/Geomatics.

This first edition of ISO/TS 19139-1 cancels and replaces ISO/TS 19139:2007, which has been technically

revised.
A list of all parts in the ISO 19139 series can be found on the ISO website.

Any feedback or questions on this document should be directed to the user’s national standards body. A

complete listing of these bodies can be found at www .iso .org/members .html.
© ISO 2019 – All rights reserved v
---------------------- Page: 5 ----------------------
ISO/TS 19139-1:2019(E)
Introduction

The importance of metadata describing digital geographic data is explained in detail in the text

of ISO 19115-1, and other International Standards, e.g. ISO 19110, ISO 19119, ISO 19157. Those

documents provide a structure for describing digital geographic data by defining metadata elements

and establishing a common set of metadata terminology, definitions and extension procedures. These

standards do not define encodings for those metadata.

To facilitate the standardization of implementations across the standards and in similar domain

schemas, this document provides a definitive set of rules for encoding ISO metadata standards in

Extensible Markup Language (XML). The resulting XML schemas are meant to enhance interoperability

by providing a common specification for describing, validating and exchanging metadata. These rules

are intended to be used in parallel to the rules in ISO 19136:2007, Annex E for encoding application

schemas into XML/GML. The difference is that those rules are for data that represents features; these

rules are for metadata about that data.

ISO 19118 describes the requirements for creating encoding rules based on UML schemas and the XML

based encoding rules as well as introducing XML. This document uses the encoding rules defined in

ISO 19118 and provides the specific details of their application with regards to deriving XML schema

for the UML models for other metadata standards.

These rules were first used in creating ISO/TS 19115-3 as an XML encoding of ISO 19115-1, i.e. ISO/

TS 19115-3 conforms to this document. They were also used to create ISO/TS 19157-2, an encoding of

ISO 19157.

The standardization target of this document is XML implementations of metadata. This includes both

other standards within the Geographic Information series and models developed by other organizations.

vi © ISO 2019 – All rights reserved
---------------------- Page: 6 ----------------------
TECHNICAL SPECIFICATION ISO/TS 19139-1:2019(E)
Geographic information — XML schema implementation —
Part 1:
Encoding rules
1 Scope

This document defines XML based encoding rules for conceptual schemas specifying types that

describe geographic resources. The encoding rules support the UML profile as used in the UML models

commonly used in the standards developed by ISO/TC 211. The encoding rules use XML schema for the

output data structure schema.

The encoding rules described in this document are not applicable for encoding UML application schema

for geographic features (see ISO 19136 for those rules).
2 Normative references

The following documents are referred to in the text in such a way that some or all of their content

constitutes requirements 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.

ISO 19118, Geographic information — Encoding
W3C XMLName, Namespaces in XML. W3C Recommendation
W3C XMLSchema-1, XML Schema Part 1: Structures. W3C Recommendation
W3C XMLSchema-2, XML Schema Part 2: Datatypes. W3C Recommendation
W3C XML, Extensible Markup Language (XML) 1.0, W3C Recommendation
W3C XLink, XML Linking Language (XLink) Version 1.0. W3C Recommendation
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

— ISO Online browsing platform: available at https: //www .iso .org/obp
— IEC Electropedia: available at https: //www .electropedia .org/
3.1
namespace

collection of names, identified by a URI reference, which are used in XML documents as element names

and attribute names
[SOURCE: W3C XML]
3.2
package
general purpose mechanism for organizing elements into groups

EXAMPLE Identification information, metadata entity set information, constraint information.

© ISO 2019 – All rights reserved 1
---------------------- Page: 7 ----------------------
ISO/TS 19139-1:2019(E)
[SOURCE: ISO 19103:2015, 4.27 — modified: The EXAMPLE has been added.]
3.3
polymorphism

characteristic of being able to assign a different meaning or usage to something in different contexts,

specifically, to allow an entity such as a variable, a function, or an object to have more than one form

Note 1 to entry: There are several different kinds of polymorphism.
[SOURCE: https: //searchcio .techtarget .com/]
3.4
realization

specialized abstraction relationship between two sets of model elements, one representing a

specification (the supplier) and the other representing an implementation of the latter (the client)

Note 1 to entry: Realization indicates inheritance of behaviour without inheritance of structure.

[SOURCE: ISO 19103:2015, 4.29]
4 Symbols and abbreviated terms
4.1 Abbreviated terms
UML Unified Modeling Language
URI Uniform Resource Identifier
XCT XML Class Type
XCPT XML Class Property Type
XCGE XML Class Global Element
XML Extensible Markup Language
XSD XML Schema Definition
4.2 Namespace abbreviations

Table 1 presents the external namespaces used in this document. The left column shows the common

namespace prefix used to describe the elements in the namespace. The second column shows the

English description of the namespace prefix. The third column is the URI of the actual namespace.

These URIs do not correspond necessarily to the location of the schemas.
Table 1 — External namespaces used by this document
Namespace
English description of the namespace URI of the actual namespace
prefix
gml Geography Markup Language http: //www .opengis .net/gml/3 .2
xlink XML Linking Language (XLink) http: //www .w3 .org/1999/xlink
xs W3C XML base schemas http: //www .w3 .org/2001/XMLSchema
2 © ISO 2019 – All rights reserved
---------------------- Page: 8 ----------------------
ISO/TS 19139-1:2019(E)
4.3 UML model stereotypes
4.3.1 Overview of UML model stereotypes

A UML stereotype is an extension mechanism for existing UML concepts. In addition to the stereotypes

already defined for describing geographic resources, this document defines stereotypes necessary for a

rules-based encoding into XML schema.

The elements of the UML diagrams depicted in Clause 7 can carry stereotypes specifying an XML

implementation. Those stereotypes, listed in the following subclauses, are carried by classes

representing XML elements or XML types, UML attributes, UML links (realizations or dependencies)

and UML packages.
4.3.2 Stereotypes of classes
In this document the following Stereotypes of classes are used:

a) <>: The class represents an implementation type encoded as an XML choice block. Each

property of the class is implemented as an element of the choice.

b) <>: The class represents an implementation type encoded as an XML complex type.

c) <>: The class represents an implementation type encoded as an XML simple type.

d) <>: The class represents an implementation type encoded as an XML complex

type with simple content.
4.3.3 Stereotypes of attributes
In this document the following Stereotypes of attributes are used:
a) <>: The property is encoded as an XML attribute.
b) <>: The property is encoded as an XML attributeGroup.

c) <>: The property is encoded as an XML element with a name and a type ( name=”propertyName” type=”propertyType”/>).
4.3.4 Stereotypes of links
In this document, the following Stereotypes of links are used:

a) <>: (carried by realization relationships) The XCT of the abstract concept to implement is

substituted by the specified external implementation.

b) <>: (carried by realization relationships) The XCGE of the abstract concept to implement is

substituted by the specified external implementation.

c) <>: (carried by realization relationships) The XCPT of the abstract concept to implement is

substituted by the specified external implementation.

d) <>: (carried by dependency relationships) The source represents an XML schema

implementing the abstract concepts defined in the target.

e) <>: (carried by dependency relationships) The source and the target represent XML

schemas. The source includes () the target.

f) <>: (carried by dependency relationships) The source and the target represent sets of

XML objects grouped within the same namespace. The source imports () the target.

© ISO 2019 – All rights reserved 3
---------------------- Page: 9 ----------------------
ISO/TS 19139-1:2019(E)
4.3.5 Stereotypes of packages
In this document, the following Stereotypes of packages are used:
a) <>: The package represents an XML schema.

b) <>: The package represents a set of XML objects grouped within the same

namespace.
5 Conformance

The framework, concepts, and methodology for testing, and the criteria to be achieved to claim

conformance, are specified in ISO 19105. An XML schema implementation of geographic resources

conforms to this document if it passes the test modules defined in Annex A.
6 Requirements for encoding
6.1 Overview of requirements

Geographic resources are generally specified in other standards and specifications, e.g. metadata

according to ISO 19115-1 and feature catalogues according to ISO 19110. Geographic resources are

represented as conceptual schemas comprising a set of UML packages containing one or more UML

classes. These conceptual schemas provide an encoding-independent view of the related geographic

resources.

XML offers many alternatives for structuring information for exchange. Clause 7, in conformance with

ISO 19118, defines XML schema encoding rules more specifically applicable to the conceptual schemas

of geographic resources.

Even within the reduced limitations of ISO 19118 and the encoding rules defined in this document,

there are still choices for the creation of specific XML schemas.

This document provides the foundation needed to establish consistent XML schema implementations of

geographic resources, in the form of a set of standardized encoding rules to be applied to the conceptual

schemas of geographic resources to create standard XML schema.

The details of XML namespaces are not included in this document. A namespace is a collection of names

that can be used in XML documents as element or attribute names. The namespace identifier is used to

identify the names with a specific schema. A namespace identifier is a URI. A URI is often cumbersome

for reading, writing and including in human discussion, so this document will refer to common

namespace prefixes when identifying the contents of a namespace.

Before presenting the details of the encoding, it is important to understand why certain encoding

rules are used. Gaining an understanding of the rules will make clear the capabilities, limitations

and best-practice use. Some of the major goals considered when developing this encoding rule were

interoperability with other ISO 19100 series specifications, predictability, extensibility and usability.

Additional details of these goals are described in 6.2 to 6.6.
6.2 Rule-based

This document defines a rule-based encoding built from UML models, e.g. those in the ISO 19100

series of International Standards, as required by ISO 19118. Using a rule-based method achieves three

important goals:

— first, the resulting XML schemas are based directly on the conceptual models and therefore increase

the chance for interoperability;

— second, the resulting schema is predictable since any class, attribute, association, etc. is encoded

just as all other UML elements of the same type are encoded;
4 © ISO 2019 – All rights reserved
---------------------- Page: 10 ----------------------
ISO/TS 19139-1:2019(E)

— third, XML schemas using these rules can be generated in an automated or semi-automated fashion.

6.3 Quality

XML schema quality in the context of this document implies that all elements of the conceptual model

are consistently implemented and that a user can directly create and/or understand the content of

an XML instance document using the conceptual schema of the corresponding geographic resource.

Additionally, an implementer can determine the XML schema implementation of a geographic resource

by knowing its conceptual schema and the encoding rules.

Another aspect to quality is completeness. This document enables encoding the entire conceptual

schema of a geographic resource without regard to usage or application.
6.4 Web implementations

One of the goals stated in 6.1 is usability. Usability, as it pertains to the design of geographic resources,

focuses on their exchange with the understanding that this will often happen in a web-based

environment. While there is no restraint against creating instance documents that never transfer

across a network, there are many aspects to the design that are intended to aid Internet and web-like

transfer of geographic resources.
6.5 Use of external XML implementations

Another design principle that aids interoperability and usability is the re-use of existing XML schemas.

If an XML schema standard already exists that encodes a part of the ISO 19100 series pertaining to

geographic metadata, then it is advantageous to incorporate that XML schema standard. If the external

XML schema is directly used, then interoperability is enhanced. It is also likely that software already

exists that can process instance documents that conform to the external XML. Furthermore, if the

external schema is well designed, it might be more efficient than XML schema generated from a series

of encoding rules and this might help achieve the goal of usability.

While using an implementation that already exists has some important advantages, it is recommended

that the external XML schemas should not violate the primary design principles defined herein. See

7.3.8 for details and examples.
6.6 Polymorphism

The term polymorphism is formally defined in 3.3. In general terms, polymorphism means the ability to

assume different forms, i.e. to implement properties using their data type or any of its derived classes.

Polymorphism allows implementers to extend the more general format of properties within their

namespaces while still providing usable and understandable instance documents for users outside of

their organization. Polymorphism primarily derives from the property type encodings described in 7.3.

7 Encoding rules
7.1 Overview of encoding rules

General rules for transforming UML to XML schema are described below and are in accordance with the

rules defined in ISO 19118. In some cases, ISO 19118 allows for multiple methods of transforming UML to

XML schema, and the rules defined here serve to clarify which method is to be used to conform with this

document. Background on classes and how they are the building blocks for encoding all data exchange

(and in this case metadata exchange) is purposefully absent from this document since ISO 19118 covers

this in detail. This document is based on the encoding rules in ISO 19118 and a familiarity with that

document will greatly enhance comprehension of the topics described throughout Clause 7.

NOTE The way the encoding rules are described doesn’t prevent adopting best practices in generating XML

schemas.
© ISO 2019 – All rights reserved 5
---------------------- Page: 11 ----------------------
ISO/TS 19139-1:2019(E)
7.2 Default encoding
7.2.1 XML class type (XCT)
7.2.1.1 Overview of XML class type (XCT)

The class is the fundamental modelling concept in UML (ISO 19118), so the fundamental encoding rules

focus on the encoding of a UML class and build from there. A class is made up of one or more properties.

It is important to recall from ISO 19118 that a property can represent an attribute, association,

aggregation or composition (ISO 19118). For example, in Figure 1, the Class1 class has three properties:

attr1, attr2 and role1. For the sake of encoding into XML schema it is important to understand that

there is no distinction between properties that are UML attributes, associations, aggregations or

compositions.

ISO 19118 also describes the need to use identifiers (ids) and domain unique identifiers (DUIDs) as

identifiers in XML schema. There is a special XML schema type in baseTypes2014.xsd in the gco

namespace, gco: AbstractObject _Type, which provides the necessary identifiers. It is mentioned here

because it is part of the default XML Class type encoding.
7.2.1.2 XCT rule

As a worked example, the UML in Figure 1 is encoded in XML using the following requirements.

Figure 1 — Example
Requirement /req/default/XCT

A UML Class shall be encoded into XML schema as an XML complex type (xs: complexType) referred to

as t
...

Questions, Comments and Discussion

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