Disclosure to Promote the Right To Information

Similar documents
Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

XML Format Plug-in User s Guide. Version 10g Release 3 (10.3)

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

BUREAU OF INDIAN STANDARDS

DRAFT(S) IN WIDE CIRCULATION. Reference Date MSD 2/T Quality Management Sectional Committee, MSD 2

Disclosure to Promote the Right To Information

PESC Compliant JSON Version /19/2018. A publication of the Technical Advisory Board Postsecondary Electronic Standards Council

Markup Languages. Lecture 4. XML Schema

स चन औ दस ज- म नक क क टल क प रस व

BUREAU OF INDIAN STANDARDS

Indian Standard. ( Revised )

Bolero Comments. The guiding principles for bolero XML tools and methodologies are:

BUREAU OF INDIAN STANDARDS

NOTE: The technical content of document is not attached herewith / available on website. To get the document please contact:

प ज ड /PGD 13 (13360)

UN/CEFACT Core Components Data Type Catalogue Version September 2009

Modelling XML Applications (part 2)

BUREAU OF INDIAN STANDARDS

Syntax XML Schema XML Techniques for E-Commerce, Budapest 2004

Java EE 7: Back-end Server Application Development 4-2

प ज ड /PGD 13 (13359)

ISO/IEC INTERNATIONAL STANDARD. Information technology Multimedia content description interface Part 2: Description definition language

Disclosure to Promote the Right To Information

प ज ड /PGD 13 (13354)

Material Handling Systems and Equipment Sectional Committee, MED 07

XML DTDs and Namespaces. CS174 Chris Pollett Oct 3, 2007.

ISO INTERNATIONAL STANDARD. Financial services Universal financial industry message scheme Part 3: Modelling

This document is a preview generated by EVS

Disclosure to Promote the Right To Information

Last week we saw how to use the DOM parser to read an XML document. The DOM parser can also be used to create and modify nodes.

Measuring the Capacity of an XML Schema

XML Schema Element and Attribute Reference

XML Schema Part 2: Datatypes

Material Handling Systems and Equipment Sectional Committee, MED 07

B oth element and attribute declarations can use simple types

ISO/IEC TR TECHNICAL REPORT. Information technology Procedures for achieving metadata registry (MDR) content consistency Part 1: Data elements

प ज ड /PGD 13 (13355)

STANDARD ST.66 DECEMBER 2007 CHANGES

DTD MIGRATION TO W3C SCHEMA

Jeff Offutt. SWE 642 Software Engineering for the World Wide Web

ISO INTERNATIONAL STANDARD. Health informatics Harmonized data types for information interchange

Graphic technology Extensible metadata platform (XMP) Part 2: Description of XMP schemas using RELAX NG

ISO/IEC INTERNATIONAL STANDARD. Information technology Metadata registries (MDR) Part 3: Registry metamodel and basic attributes

D-Cinema Packaging Caption and Closed Subtitle

Faster XML data validation in a programming language with XML datatypes

ISO INTERNATIONAL STANDARD

SDMX self-learning package No. 3 Student book. SDMX-ML Messages

XEP-0009: Jabber-RPC

Chapter 11 XML Data Modeling. Recent Development for Data Models 2016 Stefan Deßloch

Describing Document Types: The Schema Languages of XML Part 2

Australian Standard. Industrial automation systems and integration Open systems application integration framework

Semantic Web. XML and XML Schema. Morteza Amini. Sharif University of Technology Fall 94-95

ISO/TS TECHNICAL SPECIFICATION

Disclosure to Promote the Right To Information

Disclosure to Promote the Right To Information

ISO/IEC INTERNATIONAL STANDARD. Information technology Multimedia content description interface Part 5: Multimedia description schemes

ISO/IEC INTERNATIONAL STANDARD. Information technology Multimedia framework (MPEG-21) Part 21: Media Contract Ontology

ETSI STANDARD Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3

Information Technology Metadata registries (MDR) Part 5: Naming and identification principles

PESC Compliant JSON Version /04/2019

swiftml design rules Technical Specification

XML Schema. Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 28

This document is a preview generated by EVS

INTERNATIONAL STANDARD

This document is a preview generated by EVS

XML TECHNICAL SPECIFICATION

Big Data 9. Data Models

PUBLICLY AVAILABLE SPECIFICATION PRE-STANDARD

INTERNATIONAL STANDARD

This document is a preview generated by EVS

ISO/IEC INTERNATIONAL STANDARD. Information technology ASN.1 encoding rules: Mapping W3C XML schema definitions into ASN.1

UN/CEFACT Core Components Data Type Catalogue Version December 2007

So far, we've discussed the use of XML in creating web services. How does this work? What other things can we do with it?

ISO/IEC INTERNATIONAL STANDARD. Information technology Abstract Syntax Notation One (ASN.1): Specification of basic notation

This document is a preview generated by EVS

Disclosure to Promote the Right To Information

AS/NZS ISO 19157:2015

INTERNATIONAL STANDARD

XML Design Rules and Conventions (DRC) for the Exchange Network

ISO/IEC Information technology Radio frequency identification (RFID) for item management: Data protocol Application interface

Disclosure to Promote the Right To Information

THIS DOCUMENT IS STILL UNDER STUDY AND SUBJECT TO CHANGE. IT SHOULD NOT BE USED FOR REFERENCE PURPOSES.

Web Services Resource Metadata 1.0 (WS-ResourceMetadataDescriptor)

Australian Standard. Industrial automation systems and integration Open systems application integration framework

This document is a preview generated by EVS

ISO/IEC INTERNATIONAL STANDARD. Information technology Multimedia content description interface Part 1: Systems

Draft Indian Standard METHODS OF TEST FOR RUBBER AND PLASTICS HOSES PART 5 DETERMINATION OF ABRASION OF LINING 2. PCD 29(10444) C/ ISO 4650 : 2012

Transcription:

इ टरन ट म नक Disclosure to Promote the Right To Information Whereas the Parliament of India has set out to provide a practical regime of right to information for citizens to secure access to information under the control of public authorities, in order to promote transparency and accountability in the working of every public authority, and whereas the attached publication of the Bureau of Indian Standards is of particular interest to the public, particularly disadvantaged communities and those engaged in the pursuit of education and knowledge, the attached public safety standard is made available to promote the timely dissemination of this information in an accurate manner to the public. ज न1 क अ+धक र, ज 1 क अ+धक र Mazdoor Kisan Shakti Sangathan The Right to Information, The Right to Live प0र 1 क छ ड न' 5 तरफ Jawaharlal Nehru Step Out From the Old to the New IS/ISO/TS 20022-4 (2004): Universal Financial Industry Message Scheme, Part 4 ISO 20022 XML Design Rules [MSD 7: Banking and Financial services]! न $ एक न' भ रत क +नम-ण Satyanarayan Gangaram Pitroda Invent a New India Using Knowledge! न एक ऐस खज न > ज कभ च0र य नहB ज सकत ह ह Bhartṛhari Nītiśatakam Knowledge is such a treasure which cannot be stolen

Hkkjrh; ekud foùkh; lsok, lkozhkksfed foùkh; m ksx lans'k ;kstuk Hkkx 4 vkbz,l vks 20022,Dl,e,y fmtkbu ds fu;e Indian Standard FINANCIAL SERVICES UNIVERSAL FINANCIAL INDUSTRY MESSAGE SCHEME PART 4 ISO 20022 XML DESIGN RULES ICS 03.060 BIS 2012 B U R E A U O F I N D I A N S T A N D A R D S MANAK BHAVAN, 9 BAHADUR SHAH ZAFAR MARG NEW DELHI 110002 May 2012 Price Group 12

Banking and Financial Services Sectional Committee, MSD 7 NATIONAL FOREWORD This Indian Standard (Part 4) which is identical with ISO/TS 20022-4 : 2004 Financial services UNIversal Financial Industry message scheme Part 4: ISO 20022 XML design rules issued by the International Organization for Standardization (ISO) was adopted by the Bureau of Indian Standards on the recommendation of the Banking and Financial Services Sectional Committee and approval of the Management and Systems Division Council. This standard is published in various parts. Other parts in this series are: Part 1 Overall methodology and format specifications for inputs to and outputs from the ISO 20022 Repository Part 3 ISO 20022 Modelling guidelines Part 5 ISO 20022 Reverse engineering The text of ISO Technical Specification has been approved as suitable for publication as an Indian Standard without deviations. Certain conventions are, however, not identical to those used in Indian Standards. Attention is particularly drawn to the following: a) Wherever the words International Standard appear referring to this standard, they should be read as Indian Standard. b) Comma (, ) has been used as a decimal marker while in Indian Standards, the current practice is to use a point (. ) as the decimal marker. In this adopted standard, reference appear to the following International Standard for which Indian Standard also exists. The corresponding Indian Standard which is to be substituted in its place is listed below along with its degree of equivalence for the edition indicated: International Standard ISO 20022-1 : 2004 Financial services UNIversal Financial Industry message scheme Part 1: Overall methodology and format specifications for inputs to and outputs from the ISO 20022 Repository Corresponding Indian Standard IS/ISO 20022-1 : 2004 Financial services UNIversal financial industry message scheme: Part 1 Overall methodology and format specifications for inputs to and outputs from the ISO 20022 repository Degree of Equivalence Identical The technical committee has reviewed the provision of the following publication referred in this adopted standard and has decided that it is acceptable for use in conjunction with this standard: URN namespace for ISO documents ISO 20022-2 : 2007 Financial services UNIversal Financial Industry message scheme Part 2: Roles and responsibilities of the registration bodies is also under consideration for adoption as an Indian Standard.

Indian Standard FINANCIAL SERVICES UNIVERSAL FINANCIAL INDUSTRY MESSAGE SCHEME 1 Introduction PART 4 ISO 20022 XML DESIGN RULES IS/ISO/TS 20022-4 : 2004 XML is a technical standard defined by W3C (the World Wide Web Consortium) that can be used for the physical representation (i.e. the syntax) of standardized ISO 20022 Messages. XML leaves a lot of freedom for the exact way it is used in a particular application. Therefore, merely stating that XML is used is not sufficient to guarantee predictability; one must also explain HOW it will be used. This Technical Specification contains a set of XML design rules, called ISO 20022 XML. These design rules define how a standardized Message described by a Message Definition in UML 1 according to the Modelling Guidelines of ISO/TS 20022-3 must be represented as a valid ISO 20022 compliant XML document. A valid XML document (referred to hereafter as XML instance or instance ) as defined by W3C is any XML document that has an associated description and that complies with the constraints expressed in that description. The associated description in this case is derived from the Message Definition, which is originally described in UML. This Technical Specification also describes how (a part of) the UML Message Definition can be converted into a W3C XML Schema. This XML schema will then make it possible to use a validating XML schema parser to automatically verify that a given XML instance complies with (a subset of) the constraints described in the Message Definition. DTDs (Document Type Definitions) could also be used to validate partial compliance of an XML instance to its corresponding Message Definition. However, because of the limited validation functionality DTDs offer, this document does NOT cover XML DTDs. Note that this document merely explains how a given Message Definition Diagram will be mapped into XML. It doesn t explain how to create a Message Definition Diagram. This information can be found in ISO/TS 20022-3 Modelling guidelines. 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. ISO 20022-1, Financial services UNIversal Financial Industry message scheme Part 1: Overall methodology and format specifications for inputs to and outputs from the ISO 20022 Repository URN namespace for ISO documents. 1 More information about UML (Unified Modelling Language) is available on the Object Management Group website at: http://www.omg.org/uml 1

3 ISO 20022 conversion from UML to XML 3.1 Assumptions Design rules to convert a Message Definition defined in UML into ISO 20022 XML are governed by the following design choices: The current work is based on following W3C Recommendations: the XML specification of October 2000 (http://www.w3c.org/tr/2000/rec-xml-20001006) and W3C s XML Schema specification of May, 2001 (http://www.w3c.org/tr/xmlschema- 0/), (http://www.w3c.org/tr/xmlschema-1/) and (http://www.w3c.org/tr/xmlschema- 2/) ISO 20022 XML representation must be as systematic as possible: Business information is expressed as XML elements/values; Metadata information is expressed as XML attributes. XML attributes are not to be conveyed on the wire in the XML instance, unless required to remove ambiguity. Each ISO 20022 XML element, attribute, simpletype or complextype has a corresponding UML model element. Currently only ISO 20022 XML runtime (=validation) schemas are generated. Runtime schemas only contain information required to validate XML instances. No documentation or implementation information (e.g. elementid, version, definition, etc.) is mentioned. 3.2 Terminology and conventions 3.2.1 Modelling terminology and conventions 2 A Message Definition is represented in UML by a hierarchical Class Diagram (the Message Definition Diagram). The root class of the Message Definition Diagram is a UML class without attributes, containing the stereotype <<Message>>. It represents a Message. A Message is composed of Message Components. UML aggregations (with their UML role) are used to represent the parent-child relationship between the class representing the Message and its composing Message Components. A Message Component is represented as a UML class with an appropriate stereotype (<<MessageComponent>> or <<ChoiceComponent>>). A Message Component 2 See also ISO/TS 20022-3: ISO 20022 modelling guidelines for more details on the modelling of a Message Definition. 2

contains Message Elements. A Message Element is either represented as a UML class attribute (where the class represents a Message Component) or as the UML role of a UML aggregation between two UML classes (where each class represents a Message Component). Each Message Element has a type. This type is either represented as the UML type of a UML class attribute (where the attribute represents the Message Element) or by the target class of a UML aggregation (where the aggregation carries the role that represents the Message Element). The type of a Message Element is either a Message Component or a Data Type. A Data Type is represented as a UML class with an appropriate stereotype (such as <<Code>>, <<Identifier>> or <<Text>> 3 ). A Data Type may have metadata, which is then represented as a stereotyped attribute in the UML class that represents the Data Type. 3.2.2 XML naming conventions All names that are used for XML elements, XML attributes, XML simpletypes and XML complextypes are based on the names of the corresponding UML artefacts: XML simpletypes and XML complextypes use directly the names of their corresponding UML classes. For reasons of optimization 4, XML elements and XML attributes that may appear in XML instances use an abbreviated version of the names of the corresponding UML artefacts. The abbreviation is based on a ma.3pping table. Since this mapping table will be continuously updated with new abbreviations, it is put on http://www.iso20022.org. The Message is given a Message Identifier, defined by the ISO 20022 Registration Authority. The Message Identifier uniquely identifies the message and has the following structure: xxxx.nnn.aaa.bb, whereby - xxxx is an alphabetic code in four positions (fixed length) identifying the Business Process - nnn is an alphanumeric code in three positions (fixed length) identifying the Message Functionality - aaa is a numeric code in three positions (fixed length) identifying a particular flavour (variant) of Message Functionality - bb is a numeric code in two positions (fixed length) identifying the version -. character as delimiter between elements. 3 See section 3.3.2 Data Types for more information on Data Types. 4 In Annex there is a list of guidelines to be followed to optimize Messages. These guidelines aim at improving both the validation performance as well as the throughput. 3

3.3 UML to XML schema and XML instance conversion rules A Message Definition is composed of a limited number of distinct UML patterns. By defining the conversion rules from those patterns to ISO 20022 XML, we can convert any Message Definition Diagram into its corresponding ISO 20022 XML schema and any Message into its corresponding ISO 20022 XML instance. 3.3.1 Relationship between XML and UML artefacts An ISO 20022 XML element can represent the following UML artefacts: a Message a Message Element An ISO 20022 XML attribute can represent the following UML artefacts: metadata of a Data Type An ISO 20022 XML simpletype or an ISO 20022 XML complextype with simplecontent can represent the following UML artefacts: a Data Type An ISO 20022 XML complextype can represent the following UML artefacts: a Message a Message Component 3.3.2 Data Types All Message Elements that are used in a Message Definition have a type. This type may be an ISO 20022 Data Type. ISO 20022 Data Types are always based on a Data Type Representation. 4

3.3.2.1 Data Type Representations BigDecimal <<stereotype>> Rate <<Property>> RateBase : String <<stereotype>> Quantity <<XMLAttribute>> Unit : Uni tlist <<stereotype>> Amount <<XMLAttribute>> Currency : CurrencyCode String <<stereotype>> DateTime <<XMLType>> Format : DatesAndTimes <<stereotype>> Code <<stereotype>> Identifier <<Property>> IdentificationSchemeName : String <<stereotype>> Text <<Property>> Language : LanguageCode Boolean <<stereotype>> Indicator <<Property>> MeaningWhenTrue : String <<Property>> MeaningWhenFalse : String <<enumeration>> DatesAndTimes DateTime : String Time : String Duration : String Date : String gday : String gmonthday : String gyear : String gyearmonth : String gmonth : Stri ng Notes: Each ISO 20022 Data Type is represented as a UML class and is stereotyped by one of the allowed Data Type Representations. A Data Type Representation has a number of characteristics that are passed on to ( inherited by ) all Data Types that are using that Data Type Representation. In this way, characteristics common to a number of Data Types are grouped together. Some characteristics are represented as UML class attributes (stereotyped appropriately as <<XMLAttribute>>, <<Property>> or <<XMLType>> to allow the correct conversion into XML schema and XML instance) in the class that represents the ISO 20022 Data Type. Most information that is carried by these attributes is static information that only needs to be used for the documentation and/or implementation of the ISO 20022 Data Type. In some cases however the attribute will have an impact on the definition of the corresponding simpletype in the XML schema. Some information that is carried by these attributes may be dynamic information that needs to be included in each XML instance that uses this ISO 20022 Data Type. 5

Chapter 2.3.2.3 gives a detailed description for ISO 20022 Data Types per allowed Data Type Representation. This description includes the impact of the attributes on the XML schema and/or XML instance. 3.3.2.2 Primitive Data Types ISO 20022 XML primitive Data Types are encoded as defined by W3C, defined at http://www.w3.org/tr/xmlschema-2/#dt-encoding. Following XML primitive types are supported: UML Name XML Name Description String string Set of finite sequences of UTF-8 characters Boolean boolean Has the value space of boolean constants True or False Integer integer Corresponds to 32 bits integer type BigDecimal decimal Arbitrary precision decimal numbers Date date Corresponds to a date. See ISO 8601 for further details. Format CCYY-MM-DD Time time Corresponds to a time. See ISO 8601 for further details. Format HH:MM:SS +- offset to UTC DateTime datetime Corresponds to a date and time. See ISO 8601 for further details. Format CCYY-MM-DDTHH:MM:SS +- offset to UTC Duration duration Corresponds to a period in time. See ISO 8601 for further details. Format PnYnMnDTnHnMnS gday gday Corresponds to a set of one-day long, monthly periodic instances. The time zone must be UTC. See ISO 8601 for further details. Format: ---DD. gmonth gmonth Corresponds to a time period that starts at midnight on the first day of the month and lasts until the midnight that ends the last day of the month. See ISO 8601 for further details. Format: --MM--. gyear gyear Corresponds to a time period that starts at the midnight that starts the first day of the year and ends at the midnight that ends the last day of the year. It is a set of one-year long, non-periodic instances. See ISO 8601 for further details. Format: CCYY 6

gmonthday gmonthday Corresponds to a set of one-day long, annually periodic instances. The time zone must be UTC. See ISO 8601 for further details. Format:--MM-DD. base64binary base64binary represents Base64-encoded arbitrary binary data 3.3.2.3 ISO 20022 Data Types It is possible to define ISO 20022 Data Types by using one of the Data Type Representations. By doing so, all characteristics of that Data Type representation are used by that ISO 20022 Data Type (the primitive type, any properties, etc). The value space of the original primitive type (e.g. String) and of the Data Type Representation (e.g. Identifier) is constrained by specifying the actual value of the relevant characteristics (e.g. the Identification Scheme to be used). It can be further constrained by introducing UML operations stereotyped by <<Format>>. Those operations will be converted to facets when generating XML schemas. In order to apply facets, the XML types that are generated for those Data Types must be simpletypes or complextypes with simplecontent, and not complextypes 5. This is no problem as ISO 20022 Data Types map to an XML simpletype or complextype with simplecontent, which on their turn restrict an XML primitive type The following sections describe the detailed conversion rules for Data Types of all allowed Data Type Representations. 5 XML schema validation constraint: Facets cannot be applied to complextypes without simplecontent. 7

3.3.2.3.1 Data Type using Data Type Representation <<Quantity>> Properties: The Data Type Representation Quantity (see metamodel) has an attribute called Unit (stereotyped as <<XMLAttribute>>). Any Data Type that is stereotyped by <<Quantity>> must specify whether there is a list of possible values for Unit. In case there is a list containing more than one value, the attribute will appear in the XML schema as an XML attribute and each instance will contain the actually used value. The list of valid values is defined in the Data Type UnitList. In case there is only one or no value this fact will only be documented and the attribute will not appear in the XML schema or in the instance. The unit is then implied (either because it is fixed and hence documented or because it is present somewhere else in the Message). 3.3.2.3.2 Data Type using Data Type Representation <<Code>> UML Class contains an enumeration of possible values ISO 20022 XML instance ISO 20022 XML element contains the chosen value 8

Properties: This Data Type is used when the values of the list have a meaningful (i.e. semantic) value within the context of the message (e.g. the trade types). ISO 20022 Data Types using <<Code>> reference an internal list (i.e. a list specified in the schema). It is an enumeration of which one of the enumerated values has to be chosen in the instance. An enumerated value is constrained within a list of possible values. The values for the enumerated items are taken from the four-character initial value given to each of the UML enumerated attributes. 3.3.2.3.3 Data Type using Data Type Representation <<Identifier>> Properties: ISO 20022 Data Types using <<Identifier>> refer to an external list (i.e. not specified in the schema). The Data Type Representation Identifier (see metamodel) has an attribute called IdentificationSchemeName (stereotyped as <<Property>>). Any Data Type that is stereotyped by <<Identifier>> must specify the name of the actual identification scheme. This information only serves documentation purposes and will not be part of the XML schema or instance. If required, a facet may be added for syntactical checking (using operation <<Format>>). 9

3.3.2.3.4 Data Type using Data Type Representation <<Rate>> Properties: The Data Type Representation Rate (see metamodel) has an attribute called RateBase (stereotyped as <<Property>>). Any Data Type that is stereotyped by <<Rate>> must specify the base that is actually used. This information only serves documentation purposes and will not be part of the XML schema or instance. 3.3.2.3.5 Data Type using Data Type Representation <<Amount>> Properties: The Data Type Representation Amount (see metamodel) has an attribute called Currency (stereotyped as <<XMLAttribute>>). Any Data Type that is stereotyped by <<Amount>> must specify whether there is a list of possible values for Currency. In case there is a list containing more than one value, the attribute will appear in the XML schema as an XML attribute and each instance will contain the actually used value. The list of valid values is defined in the Data Type CurrencyCode. In case there is only one or no value this fact will only be documented and the attribute will not appear in the XML schema or in the instance. The currency is then implied (either because it is fixed and hence documented or because it is present somewhere else in the Message). 10

3.3.2.3.6 Data Type using Data Type Representation <<Indicator>> Properties: A Data Type stereotyped by Data Type Representation <<Indicator>> indicates that the Message Element must have a Boolean value (true or false). The Data Type Representation Indicator (see metamodel) has two attributes called MeaningWhenTrue and MeaningWhenFalse (both stereotyped as <<Property>>). Any Data Type that is stereotyped by <<Indicator>> must specify the actual meaning that is implied when the value is true and when the value is false. This information only serves documentation purposes and will not be part of the XML schema or instance. 3.3.2.3.7 Data Type using Data Type Representation <<Text>> Properties: A Data Type stereotyped by Data Type Representation <<Text>> indicates that the Message Element contains textual information. The Format operation contains the XML facet for this data type. 3.3.2.3.8 Data Type using Data Type Representation <<DateTime>> 11

Properties: The Data Type Representation DateTime (see metamodel) has an attribute called Format (stereotyped as <<XMLType>>). Any Data Type that is stereotyped by <<DateTime>> must specify the actual primitive Data Type (date, datetime, ) being used. This information will appear in the XML schema as the restriction base for this ISO 20022 Data Type. 12

3.3.2.4 Example Following example contains all of the above specified data types in one message. First the Message Definition Diagram is shown, from which the XML schema is derived. 3.3.2.4.1 Message Definition Diagram 13

3.3.2.4.2 Schema source 6 6 XML naming conventions (namely abbreviations) cannot be seen directly in the Message Definition Diagram. See also Annex A for more information on abbreviations 14

15 IS/ISO/TS 20022-4 : 2004

3.3.2.5 Schema graphical representation 3.3.2.5.1 XML instance 16

3.3.3 Conversion rules for UML patterns The following sections describe the detailed conversion rules for all UML patterns that can appear in a Message Definition. 3.3.3.1 Element order By default in ISO 20022 XML, the order of XML elements is determined as follows: Message Elements represented as class attributes come first, followed by Message Elements represented as aggregation roles. However, this can be overridden To manage the order in which XML elements are generated from a given Message Definition Diagram, each Message Element gets assigned a sequence number. 17

3.3.3.2 Simple composition Message Definition Diagram artefact Message Component Message 7 Message Element 8 of a Message Component XML schema complextype. complextype. The name becomes the XML root element that is typed by that complextype XML elements of a complextype. XML instance XML Root tag XML tag 3.3.3.2.1 Message Definition Diagram 7 There is only one such element in a message definition diagram, and it is the root element of that message. 8 Message Elements are either UML Aggregation Roles or UML Class Attributes. 18

3.3.3.2.2 Schema source 3.3.3.2.3 Schema graphical representation 19

3.3.3.2.4 XML instance 3.3.3.3 Composition of vectorial attributes (Collections) The multiplicity expresses the number of occurrences of elements. The default value is 1, in which case it can be omitted; else it is represented as a range e.g. 0..n. Use a range-multiplicity to express a collection of elements, which can represent a collection of Message Elements (expressed as attributes or as roles). Schemas can validate exactly the multiplicity. Multiplicity Description Schema representation 1 Exactly one Element name= A 0..1 Optional Element name= A minoccurs= 0 maxoccurs= 1 0..n Any number of occurrences Element name= A minoccurs= 0 maxoccurs= unbounded 1..n At least one Element name= A minoccurs= 1 maxoccurs= unbounded 1..4 From 1 to 4 Element name= A minoccurs= 1 maxoccurs= 4 0..3 From 0 to 3 Element name= A minoccurs= 0 maxoccurs= 3 20

3.3.3.3.1 Message Definition Diagram 21

3.3.3.3.2 Schema source 3.3.3.3.3 Schema graphical representation 22

3.3.3.3.4 XML instance 23

3.3.3.4 Inheritance It is possible but rare- that Message Components are specialized. However, only the most specialized Message Component may be mentioned in the Message Definition Diagram. The generalization component(s) are not mentioned in the schema. Therefore there is no need to support a specific pattern for inheritance, since it behaves from a UML to XML point of view- like a simple composition pattern. 24

3.3.3.5 Choice between Message Elements using the XOR stereotype UML notation UML notation Schema notation means r1 0..1 r1 0..n r1 1 r1 1..n r1 0..n r2 0..1 r2 0..n r2 1 r2 1..n r2 1..n minoccurs= 0 maxoccurs= 1 minoccurs= 0 maxoccurs= unbounded r1 or r2 may be present, but not both. This means both may be absent as well. r1 or r2 may be present up to n times, but not both. This means both may be absent as well. - r1 or r2 must be present, but not both (= XOR). minoccurs= 1 maxoccurs= unbounded A choice between <xsd:element name= «r1» with minoccurs= 0 maxoccurs= unbounded and <xsd:element name= «r2» minoccurs= 1 maxoccurs= unbounded r1 or r2 must be present up to n times, but not both (= XOR). r1 or r2 may be present up to n times, but not both. This means both may be absent as well. Note: some rules regarding the XOR in UML: Any name may be given to the operation An XOR must only apply to the Message Elements (i.e. class attributes and aggregation roles) pertaining to that Message Component. It is not allowed to make an XOR between a role of the current Message Component and a role of a child- or parent- Message Component. The XOR operation only applies to the Message Elements mentioned in the XOR. Consequently, some Message Elements may not be part of the XOR. Hence when Message Elements are added, they are not part of the XOR until they are also added in the XOR operation. 25

3.3.3.5.1 Message Definition Diagram 26

3.3.3.5.2 Schema source 27

3.3.3.5.3 Schema graphical representation 3.3.3.5.4 XML instance 28

3.3.3.6 Choice between Message Elements using <<choice>> stereotype This pattern models a choice between Message Elements (i.e. UML class attributes and UML aggregation roles). All Message Elements of the ChoiceComponent are part of the choice. Consequently, when a Message Element is added, it becomes automatically part of the choice (as opposed to the XOR pattern where a new Message Element does not automatically become part of the choice). When a Message Element is removed, it is automatically removed from the choice. Note: the aggregation of a <<choice>> may not have a multiplicity. However the members of a <<choice>> are allowed to have one. These multiplicities are treated as follows: Msg. Def. Diagram notation r1 0..1 r1 0..n r1 1 r1 1..n r1 0..n Msg. Def. Diagram notation r2 0..1 r2 0..n r2 1 r2 1..n r2 1..n Schema notation minoccurs= 0 maxoccurs= 1 minoccurs= 0 maxoccurs= unbounded means r1 or r2 may be present, but not both. This means both may be absent as well. r1 or r2 may be present up to n times, but not both. This means both may be absent as well. - r1 or r2 must be present, but not both (= XOR). minoccurs= 1 maxoccurs= unbounded A choice between <xsd:element name= «r1» with minoccurs= 0 maxoccurs= unbounded and <xsd:element name= «r2» minoccurs= 1 maxoccurs= unbounded r1 or r2 must be present up to n times, but not both (= XOR). r1 or r2 may be present up to n times, but not both. This means both may be absent as well. 29

3.3.3.6.1 Message Definition Diagram 30

3.3.3.6.2 Schema source 31

3.3.3.6.3 Schema graphical representation 3.3.3.6.4 XML instance 32

4 Adopted XML schema features 4.1 Assumptions An ISO 20022 XML schema contains only information relevant for the validation of XML instances by a XML schema parser. It does not contain e.g. documentation (definitions, etc) or implementation information (relationships between similar Components, etc). An ISO 20022 XML schema does not replace the UML model, it is a subset thereof. Only names appearing in XML instances are abbreviated. They are derived from their UML names (see also Annex A). Because of the affinity between UML concepts and schema concepts, any restrictions/constraints imposed by XML schema are resolved at the level of the model, not in the XML design rules. XML Elements are local within their complextype. ComplexTypes are globally unique. This is what is commonly understood as the Venetian blind style. Messages are globally unique. All aspects of dictionary management (e.g. reuse, pointers, etc) are managed at the level of the Message Definition Diagram in UML. These aspects are covered (amongst others) in ISO/TS 20022-3 Modelling guidelines. 4.2 Features 4.2.1 Namespaces in XML schema and XML instances ISO 20022 XML schema and XML instances use four namespaces: The default (non-qualified) namespace. All schema have their own default namespace composed of two parts: o A fixed part consisting of the urn namespace for ISO documents 9 : urn:iso:std:iso:20022: o A part unique to each schema: xsd:businessservice$messageidentifier where BusinessService is optional and specifies the service that is supporting the underlying business transaction MessageIdentifier is explained in clause 3.2.2 above. 9 Based on ISO specification URN namespace for ISO documents.doc/version 1.5/2004-08-05 33

xs: W3C XML schema namespace (not used in instances) xsi: W3C XML schema-instance namespace a target namespace (for schema only) which is the same as the default namespace. Example: <schema xmlns= urn:iso:std:iso:20022:xsd:$ifds.001.001.01 xmlns:xs= http://www.w3.org/2001/xmlschema targetnamespace= urn:iso:std:iso:20022:xsd:$ifds.001.001.01 > Instance: <NoticeOfExecution xmlns= urn:iso:std:iso:20022:xsd:$ifds.001.001.01 xmlns:xsi= http://www.w3.org/2001/xmlschema-instance > 4.2.2 XML facets on simpletypes The following sections describe the facets that will be introduced in the XML schema. Those XML schema facets are based on the UML operations stereotyped with <<Format>> which have been specified in the UML model according to the section 3.4 Summary of UML operations using <<Format>> related to schema production. 4.2.2.1 pattern Pattern matching allows lexical validation on strings, which syntax can be described using regular expressions, (commonly referred to as Perl expressions ). This facet only applies to strings. The exact syntax of the allowed regular expressions is defined in Appendix E of XML Schema Part 2: Datatypes (XML Schema s W3C Recommendation May 2001). For instance: <xs:simpletype name= BIC > <xs:restriction base= string > <xs:pattern value= [A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1} /> </xs:restriction> </xs:simpletype> 4.2.2.2 length, minlength, maxlength XML schema allows restriction of the value space of any string value (i.e.: double, integer, date, etc are not affected) by using the following constraining facets: length 34

minlength maxlength Those facets only apply on strings, and their values must be positive integer values. For instance, a BankAddress is a string of 10 characters minimum and 40 characters maximum: <xs:simpletype name= BankAddress > <xs:restriction base= string > <xs:minlength value= 10 /> <xs:maxlength value= 40 /> </xs:restriction> </xs:simpletype> 4.2.2.3 mininclusive, maxinclusive, minexclusive, maxexclusive XML schema allows restriction of the value space of any numerical value by using the following constraining facets: mininclusive minexclusive maxinclusive maxexclusive Those facets only apply to numerical values (Integer, Long, BigDecimal, Float, Double) and to time measurement related values (Date, Time, etc) and their value must be constants of the same type as the numeric value they apply to. For instance, the financial instrument below must contain between 1 and 100000 securities: <xs:complextype name= SecuritiesInstrument > <xs:sequence> <xs:element name= ISIN type= string /> <xs:element name= Quantity > <xs:simpletype> <xs:restriction base= xs:decimal > <xs:mininclusive value= 1 /> <xs:maxinclusive value= 100000 /> </xs:restriction> </xs:simpletype> </xs:element> </xs:sequence> </xs:complextype> 35

4.2.2.4 enumeration XML schema allows restriction of the value space of an enumeration by using the enumeration constraining facet. This facet only applies to Data Types stereotyped by <<Identifier>> or <<Code>>, and their value must be part of the original enumeration from which they restrict. For instance, a Message Component M containing a Message Element b of type E1 with restriction of the enumerated value to Value2 : <xs:complextype name="m"> <xs:sequence> <xs:element name = "b"> <xs:simpletype> <xs:restriction base="e1"> <xs:enumeration value ="Value2"/> </xs:restriction> </xs:simpletype> </xs:element> </xs:sequence> </xs:complextype> <xs:simpletype name = "E1"> <xs:restriction base = "xs:string"> <xs:enumeration value = "Value1"/> <xs:enumeration value = "Value2"/> </xs:restriction> </xs:simpletype> 4.2.2.5 totaldigits, fractiondigits Fixed point decimal values need a totaldigits specification (i.e. the maximum number of decimal digits in values of Data Types derived from decimal: totaldigits), as well as a fractiondigits specification (i.e. the maximum number of decimal digits in the fractional part of values of Data Types derived from decimal: fractiondigits). The value of the totaldigits facet must be a positive integer. The value of the fractiondigits facet must be a non-negative integer. For instance, requiring a totaldigits of 8 digits with 2 digits after the decimal point on an amount would translate to the following instance: <xs:simpletype name= Amount > <xs:restriction base= xs:decimal > <xs:totaldigits value= 8 /> <xs:fractiondigits value= 2 /> </xs:restriction> </xs:simpletype> 36

4.3 Granularity of schemas There is one schema per Message Definition Diagram. 4.4 Summary of UML operations using <<Format>> related to schema production Those operations will be defined having the <<Format>> stereotype. XML facet Applies on UML type Value of type Pattern String Defined in Appendix E of XML Schema Part 2: Datatypes (XML Schema s W3C Recommendation May 2001) Schema example <xs:simpletype name= BIC > <xs:restriction base= string > <xs:pattern value= [az]{2,4} /> </xs:restriction> </xs:simpletype> Length String Non-negative integer <xs:simpletype name= BIC > <xs:restriction base= string > <xs:length value= 12 /> </xs:restriction> </xs:simpletype> MinLength String Non-negative integer <xs:simpletype name= BIC > <xs:restriction base= string > <xs:minlength value= 8 /> </xs:restriction> </xs:simpletype> MaxLength String Non-negative integer <xs:simpletype name= BIC > <xs:restriction base= string > <xs:maxlength value= 12 /> </xs:restriction> </xs:simpletype> TotalDigits Integer, Long, Float, Double, BigDecimal Positive integer <xs:simpletype name= BEF > <xs:restriction base= xs:decimal > <xs:totaldigits value= 3 /> </xs:restriction> </xs:simpletype> 37

FractionDigits Float, Double, BigDecimal Non-negative integer <xs:simpletype name= USD > <xs:restriction base= xs:decimal > <xs:fractiondigits value= 2 /> </xs:restriction> </xs:simpletype> MinInclusive Integer, Long, Float, Double, BigDecimal Constant of the same type as the UML type <xs:simpletype name= Salary > <xs:restriction base= xs:decimal > <xs:mininclusive value= 40000 /> </xs:restriction> </xs:simpletype> MinExclusive Integer, Long, Float, Double, BigDecimal Constant of the same type as the UML type <xs:simpletype name= Salary > <xs:restriction base= xs :decimal > <xs:minexclusive value= 40000 /> </xs:restriction> </xs:simpletype> MaxInclusive Integer, Long, Float, Double, BigDecimal Constant of the same type as the UML type <xs:simpletype name= Taxes > <xs:restriction base= xs:decimal > <xs:maxinclusive value= 90000 /> </xs:restriction> </xs:simpletype> MaxExclusive Integer, Long, Float, Double, BigDecimal Constant of the same type as the UML type <xs:simpletype name= Taxes > <xs:restriction base= xs:decimal > <xs:maxexclusive value= 90000 /> </xs:restriction> </xs:simpletype> 4.5 Character set ISO 20022 XML uses UTF-8 as the (default) character encoding mechanism, for the following reasons: It has the most efficient method of character representation: It is the shortest method to represent the characters which are currently the most commonly used in a financial environment (ASCII and EBCDIC characters) 38

It can still represent almost any known character It is interoperable with many other encoding schemes through (automatable) conversion algorithms. Example: <?xml version= 1.0 encoding= UTF-8?> 39

Annex A: XML abbreviations The XML abbreviations that are stored in a separate mapping table are based on one or more of the following rules, in order to get a short and understandable XML abbreviation: 1. Remove vowels from the name 2. Use phonetic replacement (E.g. Xchg for Exchange) 3. Use commonly known English abbreviations (E.g. Rpt for Report) 4. Use commonly known acronyms (E.g. POB for PostOfficeBox) 5. Terms ending with: - "ed" -> add "d" at the end of the abbreviation - "ing" -> add "g" at the end - "y" -> add "y" at the end - "ty" -> add "ty" at the end - "al" -> add "l" at the end - "er" -> add "r" at the end (E.g. Instructed/Instructing - Instd/Instg) 6. For terms in plural, add an "s" at the end 7. For country name, use country code 8. Keep acronyms when present in the name 9. Keep digits when present in the name 10. Logical operators are abbreviated in uppercase (E.g.: EQ for Equal) 11. The use of "z" in a word is forbidden when it may be replaced by an "s". 40

Bureau of Indian Standards BIS is a statutory institution established under the Bureau of Indian Standards Act, 1986 to promote harmonious development of the activities of standardization, marking and quality certification of goods and attending to connected matters in the country. Copyright BIS has the copyright of all its publications. No part of these publications may be reproduced in any form without the prior permission in writing of BIS. This does not preclude the free use, in course of implementing the standard, of necessary details, such as symbols and sizes, type or grade designations. Enquiries relating to copyright be addressed to the Director (Publications), BIS. Review of Indian Standards Amendments are issued to standards as the need arises on the basis of comments. Standards are also reviewed periodically; a standard along with amendments is reaffirmed when such review indicates that no changes are needed; if the review indicates that changes are needed, it is taken up for revision. Users of Indian Standards should ascertain that they are in possession of the latest amendments or edition by referring to the latest issue of BIS Catalogue and Standards: Monthly Additions. This Indian Standard has been developed from Doc No.: MSD 7 (338). Amendments Issued Since Publication Amendment No. Date of Issue Text Affected Headquarters: BUREAU OF INDIAN STANDARDS Manak Bhavan, 9 Bahadur Shah Zafar Marg, New Delhi 110002 Telephones: 2323 0131, 2323 3375, 2323 9402 Website: www.bis.org.in Regional Offices: Telephones Central : Manak Bhavan, 9 Bahadur Shah Zafar Marg 23237617 NEW DELHI 110002 23233841 Eastern : 1/14, C.I.T. Scheme VII M, V.I.P. Road, Kankurgachi 2337 8499, 2337 8561 KOLKATA 700054 { 2337 8626, 2337 9120 Northern : SCO 335-336, Sector 34-A, CHANDIGARH 160022 2603843 2609285 Southern : C.I.T. Campus, IV Cross Road, CHENNAI 600113 2254 1216, 2254 1442 2254 2519, 2254 2315 Western : Manakalaya, E9 MIDC, Marol, Andheri (East) 2832 9295, 2832 7858 MUMBAI 400093 2832 7891, 2832 7892 Branches : AHMEDABAD. BANGALORE. BHOPAL. BHUBANESHWAR. COIMBATORE. DEHRADUN. FARIDABAD. GHAZIABAD. GUWAHATI. HYDERABAD. JAIPUR. KANPUR. LUCKNOW. NAGPUR. PARWANOO. PATNA. PUNE. RAJKOT. THIRUVANATHAPURAM. VISAKHAPATNAM. { { { { Published by BIS, New Delhi