[Accessibility conventions are described at the bottom of the page]

4. Naming and design rules (NDR)
[> 5.][< 3.3.1][^^^]
4.0 Formal naming and design rules
[> 4.1][> 5.][< 4.][^^][^^^]
UBL model development is only in the information models, not the document models
[[1] - using spreadsheets and UML models as the basis for collaboration
 [1] - models for different document types
 [1] - model for common library of components
]
A document model constraints the labels used for information items in XML documents
[[1] - a number of XML constraint languages are available to be used
 [1] - the UBL TC chose the W3C XML Schema (XSD) constraint language
]
UBL document models correspond to the document types in the information models
[[1] - XML documents are constrained by formal model expressions of constraints
[[2] - a given expression of constraints is a schema
 [2] - a schema is written in a schema language expressing the semantics of a given schema validation process
][1] - information models in spreadsheet form are translated into document models in a schema language
]
Naming and Design Rules (NDR) are expressed as rules for XSD schema generation that can be automated
[[1] - enables but does not oblige the rules to be applied using automation
 [1] - automated tools can be rules-driven in synthesizing the schema fragments
]
Document extension is an aspect of schema generation, not model design
[[1] - the information models say nothing at all about extension mechanisms in the schema fragments
 [1] - the UBLExtensions element and its descendants are specified as schema facilities for all document types
]
Downstream customization processes can rely on schema expressions to follow UBL NDR
[[1] - straightforward processing of expressions can be accomplished because of particular choices of rules
 [1] - breaking the rules prevents the downstream processes from being able to extract the required information out of the models
]
This illustrates the schema import and include dependencies described by the NDR:
[[1] - <xsd:include> must be used when the namespace URI string does not change
 [1] - <xsd:import> must be used when the namespace URI string changes
 [1] - the parentheses surround the namespace prefix used by convention by the UBL TC
]
[Figure 4.1: Schema dependencies
A chart illustrating the dependencies of schema fragments has boxes for each schema file, starting with the Document Schema box at the top representing an invoice, or an order, or other UBL document, in that document type's namespace.
The Document Schema imports the Common Aggregate Components (cac), Common Basic Components (cbc) and Common Extension Components (ext) fragments.
The Common Aggregate Components (cac) fragment imports the Common Basic Components (cbc), Unqualified Datatypes (udt) and Qualified/Specialized Datatypes (qdt) fragments.
The Common Basic Components (cbc) fragment imports the Unqualified Datatypes (udt) and Qualified/Specialized Datatypes (qdt) fragments.
The Qualified/Specialized Datatypes (qdt) fragment imports the Unqualified Datatypes (udt) fragment.
The Common Extension Components (ext) fragment imports the Common Basic Components (cbc) and Unqualified Datatypes (udt) fragments, and includes the Extension Content Datatype (ext) fragment.
Shown to the side in a box labeled "Customization Extension Replacement Schemas" is a replacement Extension Content Datatype (ext) fragment that imports Extension Datatype Definition (cust) fragments as required for the customization.
]
4.1 Converting the information models to document models
[> 5.][< 4.0][^^][^^^]
4.1.1 NDR document
[> 4.1.2][> 5.][< 4.0][^^][^^^]
[http://docs.oasis-open.org/ubl/prd-UBL-NDR-2.0.doc]
Sections:
[[1] - Introduction and Guiding Principles
 [1] - Relationship to ebXML Core Components
 [1] - Overall Schema Structure
 [1] - Naming and Modeling Constraints
 [1] - Reusability Scheme
 [1] - Extension Scheme
 [1] - Namespace Scheme
 [1] - Versioning Scheme
 [1] - Modularity Strategy
 [1] - Annotation and Documentation Requirements
 [1] - Naming Rules
 [1] - Declarations and Definitions
 [1] - Code Lists
]
Not delivered as part of UBL
[[1] - separate specification
 [1] - referenced by other organizations for their naming and design rules
[[2] - e.g. US Department of Navy
]]
4.1.2 NDR rule groupings
[> 4.1.3][> 5.][< 4.1.1][^][^^][^^^]
Rules are grouped by a prefix indicating the grouping:
[[1] - ATD - Attribute Declaration
 [1] - ATN - Attribute Naming
 [1] - CDL - Code List
 [1] - CTD - ComplexType Definition
 [1] - DOC - Documentation
 [1] - ELD - Element Declaration
 [1] - ELN - Element Naming
 [1] - GNR - General Naming
 [1] - GTD - General Type Definition
 [1] - GXS - General XML Schema
 [1] - IND - Instance Document
 [1] - MDC - Modeling Constraints
 [1] - NMC - Naming Constraints
 [1] - NMS - Namespace
 [1] - RED - Root Element Declaration
 [1] - SSM - Schema Structure Modularity
 [1] - STA - Standards Adherence
 [1] - VER - Versioning
]
Rules are found throughout the different sections of the document
[[1] - perform a search on the group prefix and rule number in order to find a given rule
]
Some example rules
[[1] - all information items use Oxford English (rule GNR1)
 [1] - all elements globally defined (rule ELD2)
 [1] - complex types are declared for each ABIE (rule CTN1) and BBIE (rule CTN2)
 [1] - all non-document-element elements declared in CAC or CBC schema modules (ELD10)
 [1] - every ABIE must use sequence groups (rule CTD2)
]
Important effects of the rules enabling downstream processing
[[1] - no anonymous types
 [1] - no locally-defined elements
 [1] - no choice groups
 [1] - though the ease of downstream processing was not necessarily a driving factor in selecting the NDR
]
4.1.3 NDR checklist
[> 4.1.4][> 5.][< 4.1.2][^][^^][^^^]
http://docs.oasis-open.org/ubl/os-UBL-2.0/doc/ndr/NDR-checklist.pdf
Summary report:
[[1] - enumeration of the NDR rules as a checklist of adherence
 [1] - rules in place at the time the schemata were developed
]
4.1.4 Commercial tools for implementing UBL NDR
[> 4.1.5][> 5.][< 4.1.3][^][^^][^^^]
These tools have come to the attention of the UBL TC that create document models from information models using the UBL NDR
[[1] - also useful tools for viewing the components of the information models
]
GEFEG.FX
[[1] - created and marketed by GEFEG mbH in Germany
 [1] - [http://www.gefeg.com/index.htm]
[[2] - "Downloads" at left creates a new timed session for obtaining software
 [2] - "UBL Reader" at left refreshes the data entry form for use with the UBL models
 [2] - fill out contact information
 [2] - receive key in electronic mail
]]
UBLer
[[1] - created and distributed by Invinet Systems in Spain
 [1] - [http://lists.oasis-open.org/archives/ubl/200612/msg00030.html]
]
UBLish
[[1] - created and distributed by SoftML in Singapore
 [1] - [http://www.softml.net/jedi/ubl/sw/UBLish/UBLish-1.0/index.html]
 [1] - application is free for downloading and requires use of the XPS engine
[[2] - [http://www.softml.net/xps/]
]]
4.1.5 Document extension mechanism
[> 4.1.6][> 5.][< 4.1.4][^][^^][^^^]
Document extension is an aspect of schema synthesis, not information modeling
[[1] - recall the schema hierarchy shown on [Figure 4.1]
 [1] - every document schema imports the definition of the "extension point"
 [1] - the extension point is not found in the spreadsheets
[[2] - not part of the information model
][1] - the extension point includes the definition of the extension point content
 [1] - the supplied extension point content is unconstrained allowing any information
 [1] - any specific definition of the extension point content can replace the supplied extension point content
]
Every document model can have additional information added under the extension point
[[1] - unconstrained from a UBL perspective, so any values allowed
[[2] - except the apex of the extension content must be in a non-UBL namespace
][1] - communities of users defining common extensions can constrain the extension point with a formal set of constraints in the definition of the extension point content
]
All extension content is encountered in advance of standardized content
[[1] - irrelevant to applications accessing the content in random order
 [1] - important to applications accessing the content in serial order
[[2] - by encountering all extensions first, there is no need in a serial processing application to hold off acting on standardized content in anticipation of subsequent extended content
 [2] - all extension information can be recognized and accommodated in advance of encountering the standardized content
]]
Developing extension content is an aspect of UBL customization
[[1] - see [Chapter 13.] for more information
]
4.1.6 Abbreviations
[> 5.][< 4.1.5][^][^^][^^^]
The following abbreviations must be used when creating element and attribute names:
Word sequence
Abbreviation
Credit Card Verification Numbering System
CV2
Identifier
ID
Uniform Resource Identifier
URI
United Nations Dangerous Goods
UNDG
Universal Business Language
UBL
Universally Unique Identifier
UUID


This is an accessible version of Crane's commercial training material. The content has been specifically designed to assist screen reader software in viewing the entire textual content. Figures are replaced with text narratives.

Navigation hints are in square brackets:
[Tx.x] and [Fx.x] are textual representations of the applicability icons;
[digit] indicates list depth for nested lists;
[link [URL]] indicates the URL of a hyperlink if different than link;
[EXAMPLE] indicates an example listing of code;
[FIGURE] indicates the presence of a figure replaced by its description;
[>] jumps forward;
[<] jumps backward;
[^] jumps to start of the section;
[^^] jumps to the start of the chapter;
[^^^] jumps to the table of contents.
Suggestions for improvement are welcome: [info@CraneSoftwrights.com]
Book sales: [http://www.CraneSoftwrights.com/links/trn-acc.htm]
Information: [http://www.CraneSoftwrights.com/links/info-acc.htm]
This content is protected by copyright and, as there are no means to protect this accessible version from plagiarism, please do not make any commercial edition available to others.

+//ISBN 1-894049::CSL::Presentation::UBL//DOCUMENT Practical Universal Business Language Deployment 2009-02-12 13:50UTC//EN
Practical Universal Business Language Deployment
Third Edition - 2009-02-12
ISBN 978-1-894049-23-8
Copyright © Crane Softwrights Ltd.