Designing Business Documents with UBL - OASIS...

144
Slide 1 © Document Engineering Services 2008 Break Time

Transcript of Designing Business Documents with UBL - OASIS...

Page 1: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 1© Document Engineering Services 2008

Break Time

Page 2: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 2© Document Engineering Services 2008

UBL Specification Data Types

Page 3: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 3© Document Engineering Services 2008

Relationship of Data Types

• Representation Term:– The value domain.– Conceptual.

• Core Component Type:– Still conceptual.– The actual content…– plus one or more Supplementary Components.

• Data Type: – Defines the set of valid values.– Restrictions on the Core Component Type.– Maps to implementation syntax.

Page 4: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 4© Document Engineering Services 2008

Relationship of Data Types

R

cd Data Types

Basic Business Information EntityBasic Core Component

Core Component Type Data Type

in a business context

restriction of

+Representation T erm

We are interested in these

Page 5: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 5© Document Engineering Services 2008

UBL Data Types

• Unqualified Data Types:– Corresponding Data Type for each CCTS Core

Component Type.• We have seen these earlier.

– Defined by UN/CEFACT.

• Qualified Data Types:– Specialization of Unqualified Data Type.

• Defined by UBL (for defining code lists).– Can be created/extended/customized by implementors.

• Used for facets and value constraints.

Page 6: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 6© Document Engineering Services 2008

UBL Qualified Data Types

– Allowance Charge Reason Code– Channel Code– Chip Code– Country Identification Code– Currency Code– Document Status Code– Latitude Direction Code– Line Status Code

– Longitude Direction Code– Operator Code– Packaging Type Code– Payment Means Code– Substitution Status Code– Transportation Status Code– Transport Equipment Type

Code– Transport Mode Code– Unit Of Measure Code

• Nominated BBIEs must use these.

Page 7: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 7© Document Engineering Services 2008

<xsd:complexType name="TaxCurrencyCodeType"> <xsd:simpleContent>

<xsd:extension base="qdt:CurrencyCodeType"/> </xsd:simpleContent></xsd:complexType>

Implementing a UBL Qualified Data Type

• Tax Currency Code uses the Currency Code type.

Page 8: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 8© Document Engineering Services 2008

Currency Code Data Type<xsd:complexType name="CurrencyCodeType"> <xsd:simpleContent> <xsd:restriction base="udt:CodeType"> <xsd:attribute name="listID" type="xsd:normalizedString" use="optional" default="ISO 4217 Alpha"/> <xsd:attribute name="listAgencyID" type="xsd:normalizedString" use="optional" default="6"/> <xsd:attribute name="listAgencyName" type="xsd:string" use="optional" default="United Nations Economic Commission for Europe"/> <xsd:attribute name="listName" type="xsd:string" use="optional" default="Currency"/> <xsd:attribute name="listVersionID" type="xsd:normalizedString" use="optional" default="2001"/> <xsd:attribute name="name" type="xsd:string" use="optional"/> <xsd:attribute name="languageID" type="xsd:language" use="optional" default="en"/> <xsd:attribute name="listURI" type="xsd:anyURI" use="optional" default="http://docs.oasis-open.org/ubl/os-ubl-2.0/cl/gc/cefact/CurrencyCode-2.0.gc"/> <xsd:attribute name="listSchemeURI" type="xsd:anyURI" use="optional" default="urn:un:unece:uncefact:codelist:specification:54217:2001"/> </xsd:restriction> </xsd:simpleContent></xsd:complexType>

Type defined by UN/CEFACT

Document with actual values(genericode format)

Values are based on standard codes

Page 9: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 9© Document Engineering Services 2008

Fragment of genericode File(for ISO 4217 Alpha-3)

<Row> <Value ColumnRef="code"> <SimpleValue>ARS</SimpleValue> </Value> <Value ColumnRef="name"> <SimpleValue>Argentine Peso</SimpleValue> </Value> </Row> <Row> <Value ColumnRef="code"> <SimpleValue>AUD</SimpleValue> </Value> <Value ColumnRef="name"> <SimpleValue>Australian Dollar</SimpleValue> </Value> </Row>

Code value

Name value

These terms can be changed/extended

Page 10: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 10© Document Engineering Services 2008

genericode is...

• A customizable XML document format for listing any sets of values.

• Not just for codes•An OASIS Technical Specification

• in progress.•Used by UBL to define code list values.•An alternative to using enumerated lists.

Page 11: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 11© Document Engineering Services 2008

genericode is not...

• A normative part of the UBL standard.• Cannot be verified, because...

• A validation tool.• Only documents values. • But can be used in a validation process.

Page 12: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 12© Document Engineering Services 2008

UBL Specification Physical Information Models

Page 13: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 13© Document Engineering Services 2008

Schema Representations

• Different schema languages.• Model can vary along many dimensions:

– Type definitions– Scoping of elements, attributes, and types– Use of namespaces

• The document instance might look identical in all cases.

• UBL has rules for schema representation:– Known as “Naming and Design Rules (NDR)”

Page 14: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 14© Document Engineering Services 2008

<xsd:element ref="cbc:CustomerAssignedAccountID" minOccurs="0"><xsd:annotation><xsd:documentation><ccts:Component><ccts:ComponentType>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Customer Party. Customer Assigned_ Account Identifier. Identifier</ccts:DictionaryEntryName><ccts:Definition>An identifier for the Customer's account, assigned by the Customer itself.</ccts:Definition><ccts:Cardinality>0..1</ccts:Cardinality><ccts:ObjectClass>Customer Party</ccts:ObjectClass><ccts:PropertyTermQualifier>Customer Assigned</ccts:PropertyTermQualifier><ccts:PropertyTerm>Account Identifier</ccts:PropertyTerm><ccts:RepresentationTerm>Identifier</ccts:RepresentationTerm><ccts:DataType>Identifier. Type</ccts:DataType></ccts:Component></xsd:documentation></xsd:annotation></xsd:element>

Example of a UBL Schema

Element Tag name

Documentation (not validated)- CCTS metadata

Page 15: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 15© Document Engineering Services 2008

•Attribute Declaration Rules (ATD)•Code List Rules (CDL)•ComplexType Definition Rules (CTD)•ComplexType Naming Rules (CTN)•Documentation Rules (DOC) •Element Declaration Rules (ELD)•Element Naming Rules (ELN)•General Naming Rules (GNR)•General Type Definition Rules (GTD)•General XML Schema Rules (GXS)•Modeling Constraints Rules (MDC)•Naming Constraints Rules (NMC)•Namespace Rules (NMS)•Root Element Declaration Rules (RED)•Schema Structure Modularity Rules (SSM)•Versioning Rules (VER)

Categories of NDR rules

Page 16: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 16© Document Engineering Services 2008

Some UBL NDRs

• [GNR2] UBL XML element and type names MUST be consistently derived from CCTS conformant dictionary entry names.

Page 17: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 17© Document Engineering Services 2008

Generating Schemas

• W3C XML Schema Language is complex:– Creating consistent schema from scratch is hard.

• So UBL generated schema from spreadsheets. – Based on UBL NDRs.

• Existing UBL generation tools are:– UBLer by Invinet Systems in Spain.– GEFEG.FX by GEFEG mbH in Germany.– UBLish by SoftML in Singapore.

• Emphasizes that designing models is more important than designing schema.

Page 18: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 18© Document Engineering Services 2008

UBL Schema Creation

Schema modules for

document types

Schema module for reusable

ABIEs

Schema module for Unqualified Datatypes

Imported from

UN/CEFACT

Modeling

Spreadsheets

Automated process

Based on UBL NDRs

Schema module for Qualified

Datatypes

Schema module for reusable

BBIEs

Page 19: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 19© Document Engineering Services 2008

Case Study Scenario

Page 20: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 20© Document Engineering Services 2008

Case Study Scenario

• IYT Corporation wants to order beeswax from Consortio.

But• Consortio requires

customization of UBL Party structure.

Page 21: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 21© Document Engineering Services 2008

IYT Corporation (UBL 2.0)<cac:BuyerCustomerParty><cbc:CustomerAssignedAccountID>XFB01</cbc:CustomerAssignedAccountID> <cbc:SupplierAssignedAccountID>GT00978567</cbc:SupplierAssignedAccountID> <cac:Party> <cac:PartyName> <cbc:Name>IYT Corporation</cbc:Name> </cac:PartyName> <cac:PostalAddress> <cbc:StreetName>Avon Way</cbc:StreetName> <cbc:BuildingName>Thereabouts</cbc:BuildingName> <cbc:BuildingNumber>56A</cbc:BuildingNumber> <cbc:CityName>Bridgtow</cbc:CityName> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cbc:CountrySubentity>Avon</cbc:CountrySubentity> <cac:AddressLine> <cbc:Line>3rd Floor, Room 5</cbc:Line> </cac:AddressLine> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty>

Page 22: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 22© Document Engineering Services 2008

Customization Requirements<cac:BuyerCustomerParty><cbc:CustomerAssignedAccountID>XFB01</cbc:CustomerAssignedAccountID> <cbc:SupplierAssignedAccountID>GT00978567</cbc:SupplierAssignedAccountID> <cac:Party> <cac:PartyName> <cbc:Name>IYT Corporation</cbc:Name> </cac:PartyName> <cac:PostalAddress> <cbc:StreetName>Avon Way</cbc:StreetName> <cbc:BuildingName>Thereabouts</cbc:BuildingName> <cbc:BuildingNumber>56A</cbc:BuildingNumber> <cbc:CityName>Bridgtow</cbc:CityName> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cbc:CountrySubentity>Avon</cbc:CountrySubentity> <cac:AddressLine> <cbc:Line>3rd Floor, Room 5</cbc:Line> </cac:AddressLine> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty>

Add an Account ID from trade consortium (Consip?)

Identify preferred name

Only allow an address with PO Box, Postal Zone and Country

Postal Zone has to be XXXX XXX format

Also add Post Office Name for PO Box.

Page 23: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 23© Document Engineering Services 2008

Information Required

<:BuyerCustomerParty><TradeAssignedAccountID>AAA09382</TradeAssignedAccountID> <Party> <PreferredPartyName> <Name>IYT Corporation</Name> </PreferredPartyName> <PostalAddress> <Postbox>1279</Postbox> <Postoffice>Bridgtow</Postoffice> <PostalZone>ZZ99 1ZZ</PostalZone> <Country> <IdentificationCode>GB</IdentificationCode> </Country> </PostalAddress> </Party></BuyerCustomerParty>

New BBIEs

New ASBIE

New Data Type

New ABIE

Page 24: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 24© Document Engineering Services 2008

Customizing UBLConformance or Compatibility

Page 25: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 25© Document Engineering Services 2008

• An XML document is considered UBL conformant if there are no constraint violations when validating it against a published UBL schema.

• We should only say “conformant” when we mean this.

UBL Conformance

Page 26: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 26© Document Engineering Services 2008

• Consistent or in keeping with the principles behind UBL's models and/or their development.

• Use UBL as a set of building blocks.• We cannot ensure interoperability.

– some degree of familiarity and re-use.

• Degrees of compatibility. – Like spoken languages.

• Towards interoperability.– Evolution not revolution.– “Steps up the ladder toward interoperability”.

UBL Compatibility

Page 27: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 27© Document Engineering Services 2008

Consistent Customization

• There is value in implementers customizing in a consistent manner.– Potential re-use of customized patterns.

• This involves a common approach to:– Design:

• knowing what models to change and how – Specification:

• communicating these new models (both to humans and applications)

– Validation:• ensuring documents conform to the specification.

Page 28: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 28© Document Engineering Services 2008

Customizing UBL Designing Customizations

Page 29: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 29© Document Engineering Services 2008

Typical Requirements

• Creating new BBIEs.– Developing completely new BBIE.– Qualifying the data type of existing BBIE.

• Assembling New ABIEs.– Omitting ASBIEs or BBIEs – Adding new ASBIEs or BBIEs – Modifying cardinality of ASBIEs or BBIEs.

• Creating new ASBIEs.• Assembling new document types.• Both restricted and extended customizations.

Page 30: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 30© Document Engineering Services 2008

Design for Conformance

• All schema-valid instances of a conformant customization are simultaneously schema-valid instances of UBL.– But not the other way around.

• Conformant designs only allow for restrictions:– Subsets of the document model.– Constraints on document content.

Page 31: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 31© Document Engineering Services 2008

Subsets of Document Model

• 800,000 potential elements within an Order document.• Subsets remove any unnecessary optional information

entities.• Cannot reduce the permitted minimum number of

occurrences. • Cannot extend the permitted maximum number of

occurrences.– 0..1 can become 1..1, or 0..0 (not used)– 0..n can become 0..1, 1..n, or 0..0 (not used)– 1..n can become 1..1– 1..1 cannot be restricted

Page 32: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 32© Document Engineering Services 2008

Designing for Compatibility

• All schema-valid instances of a compatible customization are not schema-valid instances of UBL.– But may be the other way around.

• Compatible design also allows for extensions (supersets)– Adding to the model any information entities that are

needed to satisfy business requirements.

Page 33: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 33© Document Engineering Services 2008

Criteria for Compatibility

• Re-use UBL Patterns– Re-use Information Entities.– Data Types.

• Use UBL principles for new Information Entities:– Normalize aggregates.– Base on conceptual model.– Design using patterns.– Use ebXML CCTS.– Use UBL NDR for any schema.

Page 34: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 34© Document Engineering Services 2008

• A customized ABIE means creating a new ABIE.– Customizing a BBIE creates a new ABIE

• Customizing a Data Type creates a new BBIE

– Customizing an ASBIE creates a new ABIE

• A customized ABIE means a new document type.

The Customization Ripple Effect

Page 35: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 35© Document Engineering Services 2008

Standard UBL Document

ubl:xxx

ubl:xxx

ubl:xxx

ubl:xxx ubl:xxx

ubl:xxx

ubl:xxx ubl:xxx

ubl:xxx ubl:xxx ubl:xxx ubl:xxx

Page 36: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 36© Document Engineering Services 2008

Customized ABIE

ubl:xxx

cus:xxx

ubl:xxx

ubl:xxx cus:xxx

cus:xxx

ubl:xxx ubl:xxx

ubl:xxx ubl:xxx ubl:xxx ubl:xxx

Page 37: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 37© Document Engineering Services 2008

Customized BBIE or Datatype

ubl:xxx

cus:xxx

ubl:xxx

ubl:xxx cus:xxx

cus:xxx

ubl:xxx ubl:xxx

ubl:xxx ubl:xxx ubl:xxx ubl:xxxcus:xxx

Page 38: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 38© Document Engineering Services 2008

Creating New Document Types

• Assemble new pathways from customized component model.

• Follow principles for document assembly...– Choose entry point ABIE.– Be guided by business rules.– Assemble BBIEs...

• Mandatory and optional– Assemble associations…

• Mandatory and optional– Note cardinality and directional constraints.– Proceed recursively through other ABIEs.

Page 39: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 39© Document Engineering Services 2008

Customizing UBL Specifying Customizations

Page 40: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 40© Document Engineering Services 2008

• W3C Schema derivation.• Independent W3C Schemas.

– By redefinition– By re-use– By using UBLExtension

• XPath files– Specify UBL restrictions.

Specification Options

Page 41: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 41© Document Engineering Services 2008

Specify Independent Schemas

• Generate new schemas.– Edit a model representation and translate the model into a

schema expression• As UBL itself did.

– May restrict the customization possibilities.

• Create new schemas.– Edit an existing UBL schema – Adhering to NDRs

• Challenge is to maintain compatibility.

Page 42: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 42© Document Engineering Services 2008

Customizing UBL Specifying Restricted Customizations

Page 43: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 43© Document Engineering Services 2008

Specifying Subset Models

• Model restriction involves some combination of – Restricting BBIEs and ASBIEs.

• removing optional information entities.

– Restricting Data Types• adding constraints such as a code list or a length facet.

• Customized documents are a subset.– Similar to EDI implementations.

• Restricted documents should be UBL conformant.– UBL SBS, OIOUBL and NES follow this approach.

Page 44: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 44© Document Engineering Services 2008

Restriction Requirements<cac:BuyerCustomerParty><cbc:CustomerAssignedAccountID>XFB01</cbc:CustomerAssignedAccountID> <cbc:SupplierAssignedAccountID>GT00978567</cbc:SupplierAssignedAccountID> <cac:Party> <cac:PartyName> <cbc:Name>IYT Corporation</cbc:Name> </cac:PartyName> <cac:PostalAddress> <cbc:StreetName>Avon Way</cbc:StreetName> <cbc:BuildingName>Thereabouts</cbc:BuildingName> <cbc:BuildingNumber>56A</cbc:BuildingNumber> <cbc:CityName>Bridgtow</cbc:CityName> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cbc:CountrySubentity>Avon</cbc:CountrySubentity> <cac:AddressLine> <cbc:Line>3rd Floor, Room 5</cbc:Line> </cac:AddressLine> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty>

Only allow an address with PO Box and Post Office

Postal Zone has to be XXXX XXX format

Page 45: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 45© Document Engineering Services 2008

cd Restricted Address

«ABIE»Address

# «BBIE» ID: Identifier [0..1]- «BBIE» Address Type Code: Code [0..1]- «BBIE» Address Format Code: Code [0..1]# «BBIE» Postbox: Text [0..1]# «BBIE» Floor: Text [0..1]# «BBIE» Room: Text [0..1]# «BBIE» Street Name: Name [0..1]# «BBIE» Additional Street Name: Name [0..1]- «BBIE» Block Name: Name [0..1]# «BBIE» Building Name: Name [0..1]# «BBIE» Building Number: Text [0..1]# «BBIE» Inhouse Mail: Text [0..1]# «BBIE» Department: Text [0..1]- «BBIE» Mark Attention: Text [0..1]- «BBIE» Mark Care: Text [0..1]- «BBIE» Plot Identification: Text [0..1]- «BBIE» City Subdivision Name: Name [0..1]# «BBIE» City Name: Name [0..1]# «BBIE» Postal Zone: Text [0..1]# «BBIE» Country Subentity: Text [0..1]# «BBIE» Country Subentity Code: Code [0..1]# «BBIE» Region: Text [0..1]# «BBIE» District: Text [0..1]# «BBIE» Timezone Offset: Text [0..1]

«ABIE»Item::Restricted Address

# «BBIE» Postbox: Text# «BBIE» Postal Zone: FourSpaceThreeText

Restricted Model

tightened constraints

subset

restriction on format

Page 46: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 46© Document Engineering Services 2008

Specifying Constraints on Content

• Implemented as Qualified Data Types:– Refinements of:

• Unqualified Data Types.• Other Qualified Data Types.

• Use genericode format for defining values!

Page 47: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 47© Document Engineering Services 2008

Example of NES Restriction

Page 48: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 48© Document Engineering Services 2008

NES Architecture

A lower level library cannot extend cardinality or add BIEs that are not part of the library directly above.

Page 49: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 49© Document Engineering Services 2008

Subset Schema

• The UBL 2.0 Small Business Subset is one example of how a conformant subset may be specified through the use of a subset schema– All instances of UBL 2.0 SBS are instances of full UBL 2.0– The UBL 2.0 SBS schemas are pruned copies of the

normative UBL 2.0 schemas• Research is underway to demonstrate the pruned

schemas are provably correct proper subsets of the full schemas

Page 50: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 50© Document Engineering Services 2008

Customizing UBL Specifying Extension Customizations

Page 51: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 51© Document Engineering Services 2008

Extending UBL

• The UBL Library is 80/20.– Generic context of use, not specific.

• Extension involves some combination of:– Creating new ABIEs, BBIEs and ASBIEs.– Extending cardinality

• Making optional, mandatory.

– Creating new Unqualified Data Types.• Not derived from existing Data Types.

• Extended documents are a superset.– Should be UBL compatible.

• CODICE followed this approach.

Page 52: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 52© Document Engineering Services 2008

Customizing UBL Extension using UBLExtension

Page 53: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 53© Document Engineering Services 2008

UBLExtension

• Ensures conformance.– All instances will pass UBL schema validation.

• No inherent constraints.– Based on xsd:any.

• Use if nothing else fits.– Include legacy document formats.

• The ”black hole” of UBL.– Use with caution.

• Needs care when implementing.

Page 54: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 54© Document Engineering Services 2008

UBLExtension Caveats

• Should be documented. – Specifying context.

• Should be registered.– Somewhere ?

• Should never be used for information that may properly be conveyed in standard UBL patterns elsewhere in the document.

• Extension content model should aim for UBL compatibility.– Conformance is not enough.

Page 55: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 55© Document Engineering Services 2008

UBLExtension Structure

Page 56: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 56© Document Engineering Services 2008

<Order> <ext:UBLExtension> <ext:ExtensionContent> <eac:BuyerExtendedCustomerParty> <ebc:TradeAssignedAccountID>T123356</ebc:TradeAssignedAccountID> <eac:ExtendedParty> <eac:PrimaryPartyName> <cbc:Name>IYT</cbc:Name> </eac:PrimaryPartyName> <eac:AlternativePostalExtendedAddress> <ebc:Postoffice>South Bridgtow</ebc:Postoffice> <eac:Address> <cbc:Postbox>2234</cbc:Postbox> <cbc:PostalZone>ZZ99 0AA</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </eac:Address> </eac:AlternativePostalExtendedAddress> </eac:ExtendedParty> </eac:BuyerExtendedCustomerParty> </ext:ExtensionContent> </ext:UBLExtension>… standard order details …</Order>

UBLExtension Sample

Can be anything in here

Normal UBL Order

Page 57: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 57© Document Engineering Services 2008

OIOUBL UBLExtension Example

<ext:UBLExtensions>  <ext:UBLExtension>     <cbc:ID>WMP1</cbc:ID>     <cbc:Name>WMData</cbc:Name>     <ext:ExtensionAgencyID>EAI1</ext:ExtensionAgencyID>     <ext:ExtensionAgencyName>EAN1</ext:ExtensionAgencyName>     <ext:ExtensionAgencyURI>EAU1</ext:ExtensionAgencyURI>     <ext:ExtensionURI>urn:wmdata.dk:example</ext:ExtensionURI>     <ext:ExtensionReasonCode>OPT</ext:ExtensionReasonCode>     <ext:ExtensionReason>wmdata legacy invoice material

</ext:ExtensionReason>     <ext:ExtensionContent>      <wmp:LegacyExtension

xmlns:wmp="urn:urn:wmdata.dk:example">           ...legacy invoice stuff...       </wmp:LegacyExtension>     </ext:ExtensionContent>  </ext:UBLExtension></ext:UBLExtensions>

A common application

Registration details

Page 58: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 58© Document Engineering Services 2008

• Identifies the legitimate elements and attributes in a document instance.

• Document definition:– List of all legitimate XPaths.– Can be very large!

• They can be generated from:– XSD schemas.– XML instances.– UBL spreadsheets.

• Used by UBL.– Small Business Subset definitions

XPath Specification

Page 59: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 59© Document Engineering Services 2008

Sample XPath Specification

/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/16 1..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:StreetName16.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:BuildingName17.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:BuildingNumber18.1 0..1 /po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:CitySubdivisionName19.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:CityName20.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:PostalZone21.1 0..1

Page 60: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 60© Document Engineering Services 2008

Validating UBL Customizations

Page 61: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 61© Document Engineering Services 2008

Validating XML Documents

• Model/Profile validation.• Content/Value validation.• W3C Schemas.

– Parser applications.

• Other schema languages.– Relax NG, ASN.1

• Programmable languages.– ISO Schematron (and stylesheets).– Coded applications (scripts/programs).

Page 62: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 62© Document Engineering Services 2008

Identifying Customizations

• Profiles enable 'families' of customizations. – “Stand Alone Invoicing” is a profile for NES.

• Meaning the requirements for stand alone invoicing in the northern European context.

• Special BBIEs allow instances to identify their customization specifications:• 'UBLVersionID'

• the UBL version being customized. • 'UBLCustomizationID'

• an identifier (such as a namespace) for a specified customization of UBL.

• 'UBLProfileID' • an identifier (such as a namespace) for a specified profile of the

customization being used.

Page 63: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 63© Document Engineering Services 2008

UBL Schema Validation

• A document schema defines all rules for validation.• Documents must pass this to be deemed UBL

conformant.• Degree of acceptability depends on number of business

rules tested.– Limited with W3C Schema

Page 64: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 64© Document Engineering Services 2008

Validating UBL Conformance

Any Document

UBL Schema

UBL Conformant Document

Page 65: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 65© Document Engineering Services 2008

Validating Using XPath

• XPaths can be utilized to validate elements.• Can implement an exhaustive proof of conformance

and/or compatibility.• Conformance, by programmatically checking:

– all of the XPath entries of the subset are found in UBL.– none of the mandatory items in the UBL are missing from the

subset. • Extensions, by programmatically checking:

– none of the mandatory items in the UBL are missing from the superset.

Page 66: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 66© Document Engineering Services 2008

Multi-Stage Validation

• Pre-conformance processes– Separate extensions.

• Conformance processes– Validate against UBL Schema

• Post-conformance processes– Validate restrictions.

• Experience suggests we will evolve toward this approach.

Page 67: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 67© Document Engineering Services 2008

Validating Customizations

UBL Portion ofDocument

UBL Schema

Restricted XPaths

UBL Conformant Document

Valid CustomizedDocument

Any Document

Extension XPaths

Page 68: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 68© Document Engineering Services 2008

<Order> <ext:UBLExtension> <ext:ExtensionContent> <eac:BuyerExtendedCustomerParty> <ebc:TradeAssignedAccountID>T123356</ebc:TradeAssignedAccountID> <eac:ExtendedParty> <eac:PrimaryPartyName> <cbc:Name>IYT</cbc:Name> </eac:PrimaryPartyName> <eac:AlternativePostalExtendedAddress> <ebc:Postoffice>South Bridgtow</ebc:Postoffice> <eac:Address> <cbc:Postbox>2234</cbc:Postbox> <cbc:PostalZone>ZZ99 0AA</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </eac:Address> </eac:AlternativePostalExtendedAddress> </eac:ExtendedParty> </eac:BuyerExtendedCustomerParty> </ext:ExtensionContent> </ext:UBLExtension>

<cac:BuyerCustomerParty> <cac:Party> <cac:PostalAddress> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty></Order>

UBLExtension and Stub

Document without extensions

Document with extensions

Page 69: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 69© Document Engineering Services 2008

Customized Document Architecture

• Use standard UBL document schema.– UBLExtension contains entire document to be processed.– Document body contains only the valid UBL component.

• This “stub” is validated by UBL schema.

• Data is duplicated.– Is this a problem?

• Always UBL conformant.– Consistent common data.

Page 70: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 70© Document Engineering Services 2008

Summary and Feedback

Page 71: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 71© Document Engineering Services 2008

Summary

• Background to Document Design

• UBL Design• UBL Specification• Designing Customizations

• Specifying Customizations

• Validating Customizations

Page 72: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 72© Document Engineering Services 2008

Towards a Universal Business Language

Thank You

謝 謝

ありがとう

Page 73: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 1

© Document Engineering Services 2008

Break Time

Page 74: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 2

04/04/08

© Document Engineering Services 2008

UBL Specification Data Types

Page 75: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 3

04/04/08

© Document Engineering Services 2008

Relationship of Data Types

• Representation Term:– The value domain.– Conceptual.

• Core Component Type:– Still conceptual.– The actual content…– plus one or more Supplementary Components.

• Data Type: – Defines the set of valid values.– Restrictions on the Core Component Type.– Maps to implementation syntax.

Page 76: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 4

04/04/08

© Document Engineering Services 2008

Relationship of Data TypesR

cd Data Types

Basic Business Information EntityBasic Core Component

Core Component Type Data Type

in a business context

restriction of

+Representa tion T erm

We are interested in these

Page 77: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 5

04/04/08

© Document Engineering Services 2008

UBL Data Types

• Unqualified Data Types:– Corresponding Data Type for each CCTS Core

Component Type.• We have seen these earlier.

– Defined by UN/CEFACT.

• Qualified Data Types:– Specialization of Unqualified Data Type.

• Defined by UBL (for defining code lists).– Can be created/extended/customized by implementors.

• Used for facets and value constraints.

Page 78: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 6

© Document Engineering Services 2008

UBL Qualified Data Types

– Allowance Charge Reason Code– Channel Code– Chip Code

– Country Identification Code

– Currency Code

– Document Status Code

– Latitude Direction Code

– Line Status Code

– Longitude Direction Code– Operator Code– Packaging Type Code– Payment Means Code– Substitution Status Code– Transportation Status Code– Transport Equipment Type

Code– Transport Mode Code– Unit Of Measure Code

• Nominated BBIEs must use these.

Page 79: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 7

© Document Engineering Services 2008

<xsd:complexType name="TaxCurrencyCodeType"> <xsd:simpleContent>

<xsd:extension base="qdt:CurrencyCodeType"/> </xsd:simpleContent></xsd:complexType>

Implementing a UBL Qualified Data Type

• Tax Currency Code uses the Currency Code type.

Page 80: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 8

© Document Engineering Services 2008

Currency Code Data Type<xsd:complexType name="CurrencyCodeType"> <xsd:simpleContent> <xsd:restriction base="udt:CodeType"> <xsd:attribute name="listID" type="xsd:normalizedString" use="optional" default="ISO 4217 Alpha"/> <xsd:attribute name="listAgencyID" type="xsd:normalizedString" use="optional" default="6"/> <xsd:attribute name="listAgencyName" type="xsd:string" use="optional" default="United Nations Economic Commission for Europe"/> <xsd:attribute name="listName" type="xsd:string" use="optional" default="Currency"/> <xsd:attribute name="listVersionID" type="xsd:normalizedString" use="optional" default="2001"/> <xsd:attribute name="name" type="xsd:string" use="optional"/> <xsd:attribute name="languageID" type="xsd:language" use="optional" default="en"/> <xsd:attribute name="listURI" type="xsd:anyURI" use="optional" default="http://docs.oasis-open.org/ubl/os-ubl-2.0/cl/gc/cefact/CurrencyCode-2.0.gc"/> <xsd:attribute name="listSchemeURI" type="xsd:anyURI" use="optional" default="urn:un:unece:uncefact:codelist:specification:54217:2001"/> </xsd:restriction> </xsd:simpleContent></xsd:complexType>

Type defined by UN/CEFACT

Document with actual values(genericode format)

Values are based on standard codes

Page 81: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 9

© Document Engineering Services 2008

Fragment of genericode File(for ISO 4217 Alpha-3)

<Row> <Value ColumnRef="code"> <SimpleValue>ARS</SimpleValue> </Value> <Value ColumnRef="name"> <SimpleValue>Argentine Peso</SimpleValue> </Value> </Row> <Row> <Value ColumnRef="code"> <SimpleValue>AUD</SimpleValue> </Value> <Value ColumnRef="name"> <SimpleValue>Australian Dollar</SimpleValue> </Value> </Row>

Code value

Name value

These terms can be changed/extended

Page 82: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 10

© Document Engineering Services 2008

genericode is...

• A customizable XML document format for listing any sets of values.

• Not just for codes•An OASIS Technical Specification

• in progress.•Used by UBL to define code list values.•An alternative to using enumerated lists.

Page 83: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 11

© Document Engineering Services 2008

genericode is not...

• A normative part of the UBL standard.• Cannot be verified, because...

• A validation tool.• Only documents values. • But can be used in a validation process.

Page 84: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 12

04/04/08

© Document Engineering Services 2008

UBL Specification Physical Information Models

Page 85: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

13@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 13

04/04/08

© Document Engineering Services 2008

Schema Representations

• Different schema languages.• Model can vary along many dimensions:

– Type definitions– Scoping of elements, attributes, and types– Use of namespaces

• The document instance might look identical in all cases.

• UBL has rules for schema representation:– Known as “Naming and Design Rules (NDR)”

[Show an instance example]

Page 86: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 14

04/04/08

© Document Engineering Services 2008

<xsd:element ref="cbc:CustomerAssignedAccountID" minOccurs="0"><xsd:annotation><xsd:documentation><ccts:Component><ccts:ComponentType>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Customer Party. Customer Assigned_ Account Identifier. Identifier</ccts:DictionaryEntryName><ccts:Definition>An identifier for the Customer's account, assigned by the Customer itself.</ccts:Definition><ccts:Cardinality>0..1</ccts:Cardinality><ccts:ObjectClass>Customer Party</ccts:ObjectClass><ccts:PropertyTermQualifier>Customer Assigned</ccts:PropertyTermQualifier><ccts:PropertyTerm>Account Identifier</ccts:PropertyTerm><ccts:RepresentationTerm>Identifier</ccts:RepresentationTerm><ccts:DataType>Identifier. Type</ccts:DataType></ccts:Component></xsd:documentation></xsd:annotation></xsd:element>

Example of a UBL Schema

Element Tag name

Documentation (not validated)- CCTS metadata

Page 87: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 15

04/04/08

© Document Engineering Services 2008

•Attribute Declaration Rules (ATD)•Code List Rules (CDL)•ComplexType Definition Rules (CTD)•ComplexType Naming Rules (CTN)•Documentation Rules (DOC) •Element Declaration Rules (ELD)•Element Naming Rules (ELN)•General Naming Rules (GNR)•General Type Definition Rules (GTD)•General XML Schema Rules (GXS)•Modeling Constraints Rules (MDC)•Naming Constraints Rules (NMC)•Namespace Rules (NMS)•Root Element Declaration Rules (RED)•Schema Structure Modularity Rules (SSM)•Versioning Rules (VER)

Categories of NDR rules

Page 88: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 16

04/04/08

© Document Engineering Services 2008

Some UBL NDRs

• [GNR2] UBL XML element and type names MUST be consistently derived from CCTS conformant dictionary entry names.

Page 89: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 17

04/04/08

© Document Engineering Services 2008

Generating Schemas

• W3C XML Schema Language is complex:– Creating consistent schema from scratch is hard.

• So UBL generated schema from spreadsheets. – Based on UBL NDRs.

• Existing UBL generation tools are:– UBLer by Invinet Systems in Spain.– GEFEG.FX by GEFEG mbH in Germany.– UBLish by SoftML in Singapore.

• Emphasizes that designing models is more important than designing schema.

Page 90: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

18@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 18

04/04/08

© Document Engineering Services 2008

UBL Schema Creation

Schema modules for

document types

Schema module for reusable

ABIEs

Schema module for Unqualified Datatypes

Imported from

UN/CEFACT

Modeling

Spreadsheets

Automated process

Based on UBL NDRs

Schema module for Qualified

Datatypes

Schema module for reusable

BBIEs

Page 91: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 19

04/04/08

© Document Engineering Services 2008

Case Study Scenario

Page 92: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 20

04/04/08

© Document Engineering Services 2008

Case Study Scenario

• IYT Corporation wants to order beeswax from Consortio.

But• Consortio requires

customization of UBL Party structure.

Page 93: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 21

04/04/08

© Document Engineering Services 2008

IYT Corporation (UBL 2.0)<cac:BuyerCustomerParty><cbc:CustomerAssignedAccountID>XFB01</cbc:CustomerAssignedAccountID> <cbc:SupplierAssignedAccountID>GT00978567</cbc:SupplierAssignedAccountID> <cac:Party> <cac:PartyName> <cbc:Name>IYT Corporation</cbc:Name> </cac:PartyName> <cac:PostalAddress> <cbc:StreetName>Avon Way</cbc:StreetName> <cbc:BuildingName>Thereabouts</cbc:BuildingName> <cbc:BuildingNumber>56A</cbc:BuildingNumber> <cbc:CityName>Bridgtow</cbc:CityName> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cbc:CountrySubentity>Avon</cbc:CountrySubentity> <cac:AddressLine> <cbc:Line>3rd Floor, Room 5</cbc:Line> </cac:AddressLine> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty>

Page 94: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 22

04/04/08

© Document Engineering Services 2008

Customization Requirements<cac:BuyerCustomerParty><cbc:CustomerAssignedAccountID>XFB01</cbc:CustomerAssignedAccountID> <cbc:SupplierAssignedAccountID>GT00978567</cbc:SupplierAssignedAccountID> <cac:Party> <cac:PartyName> <cbc:Name>IYT Corporation</cbc:Name> </cac:PartyName> <cac:PostalAddress> <cbc:StreetName>Avon Way</cbc:StreetName> <cbc:BuildingName>Thereabouts</cbc:BuildingName> <cbc:BuildingNumber>56A</cbc:BuildingNumber> <cbc:CityName>Bridgtow</cbc:CityName> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cbc:CountrySubentity>Avon</cbc:CountrySubentity> <cac:AddressLine> <cbc:Line>3rd Floor, Room 5</cbc:Line> </cac:AddressLine> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty>

Add an Account ID from trade consortium (Consip?)

Identify preferred name

Only allow an address with PO Box, Postal Zone and Country

Postal Zone has to be XXXX XXX format

Also add Post Office Name for PO Box.

Page 95: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 23

04/04/08

© Document Engineering Services 2008

Information Required

<:BuyerCustomerParty><TradeAssignedAccountID>AAA09382</TradeAssignedAccountID> <Party> <PreferredPartyName> <Name>IYT Corporation</Name> </PreferredPartyName> <PostalAddress> <Postbox>1279</Postbox> <Postoffice>Bridgtow</Postoffice> <PostalZone>ZZ99 1ZZ</PostalZone> <Country> <IdentificationCode>GB</IdentificationCode> </Country> </PostalAddress> </Party></BuyerCustomerParty>

New BBIEs

New ASBIE

New Data Type

New ABIE

Page 96: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 24

04/04/08

© Document Engineering Services 2008

Customizing UBLConformance or Compatibility

Page 97: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 25

04/04/08

© Document Engineering Services 2008

• An XML document is considered UBL conformant if there are no constraint violations when validating it against a published UBL schema.

• We should only say “conformant” when we mean this.

UBL Conformance

Page 98: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 26

04/04/08

© Document Engineering Services 2008

• Consistent or in keeping with the principles behind UBL's models and/or their development.

• Use UBL as a set of building blocks.• We cannot ensure interoperability.

– some degree of familiarity and re-use.

• Degrees of compatibility. – Like spoken languages.

• Towards interoperability.– Evolution not revolution.

– “Steps up the ladder toward interoperability”.

UBL Compatibility

Page 99: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 27

04/04/08

© Document Engineering Services 2008

Consistent Customization

• There is value in implementers customizing in a consistent manner.– Potential re-use of customized patterns.

• This involves a common approach to:– Design:

• knowing what models to change and how – Specification:

• communicating these new models (both to humans and applications)

– Validation:• ensuring documents conform to the specification.

Page 100: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 28

04/04/08

© Document Engineering Services 2008

Customizing UBL Designing Customizations

Page 101: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 29

04/04/08

© Document Engineering Services 2008

Typical Requirements

• Creating new BBIEs.– Developing completely new BBIE.– Qualifying the data type of existing BBIE.

• Assembling New ABIEs.– Omitting ASBIEs or BBIEs – Adding new ASBIEs or BBIEs – Modifying cardinality of ASBIEs or BBIEs.

• Creating new ASBIEs.• Assembling new document types.• Both restricted and extended customizations.

Page 102: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

30@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 30

04/04/08

© Document Engineering Services 2008

Design for Conformance

• All schema-valid instances of a conformant customization are simultaneously schema-valid instances of UBL.– But not the other way around.

• Conformant designs only allow for restrictions:– Subsets of the document model.– Constraints on document content.

Page 103: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

31@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 31

04/04/08

© Document Engineering Services 2008

Subsets of Document Model

• 800,000 potential elements within an Order document.• Subsets remove any unnecessary optional information

entities.• Cannot reduce the permitted minimum number of

occurrences. • Cannot extend the permitted maximum number of

occurrences.– 0..1 can become 1..1, or 0..0 (not used)– 0..n can become 0..1, 1..n, or 0..0 (not used)– 1..n can become 1..1– 1..1 cannot be restricted

Page 104: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

32@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 32

04/04/08

© Document Engineering Services 2008

Designing for Compatibility

• All schema-valid instances of a compatible customization are not schema-valid instances of UBL.– But may be the other way around.

• Compatible design also allows for extensions (supersets)– Adding to the model any information entities that are

needed to satisfy business requirements.

Page 105: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 33

04/04/08

© Document Engineering Services 2008

Criteria for Compatibility

• Re-use UBL Patterns– Re-use Information Entities.– Data Types.

• Use UBL principles for new Information Entities:– Normalize aggregates.

– Base on conceptual model.

– Design using patterns.– Use ebXML CCTS.– Use UBL NDR for any schema.

Page 106: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 34

04/04/08

© Document Engineering Services 2008

• A customized ABIE means creating a new ABIE.– Customizing a BBIE creates a new ABIE

• Customizing a Data Type creates a new BBIE

– Customizing an ASBIE creates a new ABIE

• A customized ABIE means a new document type.

The Customization Ripple Effect

Page 107: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 35

04/04/08

© Document Engineering Services 2008

Standard UBL Document

ubl:xxx

ubl:xxx

ubl:xxx

ubl:xxx ubl:xxx

ubl:xxx

ubl:xxx ubl:xxx

ubl:xxx ubl:xxx ubl:xxx ubl:xxx

Page 108: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 36

04/04/08

© Document Engineering Services 2008

Customized ABIE

ubl:xxx

cus:xxx

ubl:xxx

ubl:xxx cus:xxx

cus:xxx

ubl:xxx ubl:xxx

ubl:xxx ubl:xxx ubl:xxx ubl:xxx

Page 109: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 37

04/04/08

© Document Engineering Services 2008

Customized BBIE or Datatype

ubl:xxx

cus:xxx

ubl:xxx

ubl:xxx cus:xxx

cus:xxx

ubl:xxx ubl:xxx

ubl:xxx ubl:xxx ubl:xxx ubl:xxxcus:xxx

Page 110: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 38

04/04/08

© Document Engineering Services 2008

Creating New Document Types

• Assemble new pathways from customized component model.

• Follow principles for document assembly...– Choose entry point ABIE.– Be guided by business rules.– Assemble BBIEs...

• Mandatory and optional– Assemble associations…

• Mandatory and optional– Note cardinality and directional constraints.– Proceed recursively through other ABIEs.

Page 111: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 39

04/04/08

© Document Engineering Services 2008

Customizing UBL Specifying Customizations

Page 112: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 40

04/04/08

© Document Engineering Services 2008

• W3C Schema derivation.• Independent W3C Schemas.

– By redefinition– By re-use– By using UBLExtension

• XPath files– Specify UBL restrictions.

Specification Options

Page 113: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 41

04/04/08

© Document Engineering Services 2008

Specify Independent Schemas

• Generate new schemas.– Edit a model representation and translate the model into a

schema expression• As UBL itself did.

– May restrict the customization possibilities.

• Create new schemas.– Edit an existing UBL schema – Adhering to NDRs

• Challenge is to maintain compatibility.

Page 114: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 42

04/04/08

© Document Engineering Services 2008

Customizing UBL Specifying Restricted Customizations

Page 115: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 43

04/04/08

© Document Engineering Services 2008

Specifying Subset Models

• Model restriction involves some combination of – Restricting BBIEs and ASBIEs.

• removing optional information entities.

– Restricting Data Types• adding constraints such as a code list or a length facet.

• Customized documents are a subset.– Similar to EDI implementations.

• Restricted documents should be UBL conformant.– UBL SBS, OIOUBL and NES follow this approach.

Page 116: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 44

04/04/08

© Document Engineering Services 2008

Restriction Requirements<cac:BuyerCustomerParty><cbc:CustomerAssignedAccountID>XFB01</cbc:CustomerAssignedAccountID> <cbc:SupplierAssignedAccountID>GT00978567</cbc:SupplierAssignedAccountID> <cac:Party> <cac:PartyName> <cbc:Name>IYT Corporation</cbc:Name> </cac:PartyName> <cac:PostalAddress> <cbc:StreetName>Avon Way</cbc:StreetName> <cbc:BuildingName>Thereabouts</cbc:BuildingName> <cbc:BuildingNumber>56A</cbc:BuildingNumber> <cbc:CityName>Bridgtow</cbc:CityName> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cbc:CountrySubentity>Avon</cbc:CountrySubentity> <cac:AddressLine> <cbc:Line>3rd Floor, Room 5</cbc:Line> </cac:AddressLine> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty>

Only allow an address with PO Box and Post Office

Postal Zone has to be XXXX XXX format

Page 117: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 45

04/04/08

© Document Engineering Services 2008

cd Restricted Address

«ABIE»Address

# «BBIE» ID: Identifier [0..1]- «BBIE» Address Type Code: Code [0..1]- «BBIE» Address Format Code: Code [0..1]# «BBIE» Postbox: Text [0..1]# «BBIE» Floor: Text [0..1]# «BBIE» Room: Text [0..1]# «BBIE» Street Name: Name [0..1]# «BBIE» Additional Street Name: Name [0..1]- «BBIE» Block Name: Name [0..1]# «BBIE» Building Name: Name [0..1]# «BBIE» Building Number: Text [0..1]# «BBIE» Inhouse Mail: Text [0..1]# «BBIE» Department: Text [0..1]- «BBIE» Mark Attention: Text [0..1]- «BBIE» Mark Care: Text [0..1]- «BBIE» Plot Identification: Text [0..1]- «BBIE» City Subdivision Name: Name [0..1]# «BBIE» City Name: Name [0..1]# «BBIE» Postal Zone: Text [0..1]# «BBIE» Country Subentity: Text [0..1]# «BBIE» Country Subentity Code: Code [0..1]# «BBIE» Region: Text [0..1]# «BBIE» District: Text [0..1]# «BBIE» Timezone Offset: Text [0..1]

«ABIE»Item::Restricted Address

# «BBIE» Postbox: Text# «BBIE» Postal Zone: FourSpaceThreeText

Restricted Model

tightened constraints

subset

restriction on format

Page 118: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 46

04/04/08

© Document Engineering Services 2008

Specifying Constraints on Content

• Implemented as Qualified Data Types:– Refinements of:

• Unqualified Data Types.• Other Qualified Data Types.

• Use genericode format for defining values!

Page 119: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 47

04/04/08

© Document Engineering Services 2008

Example of NES Restriction

Page 120: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 48

04/04/08

© Document Engineering Services 2008

NES Architecture

A lower level library cannot extend cardinality or add BIEs that are not part of the library directly above.

Page 121: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

49@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 49

04/04/08

© Document Engineering Services 2008

Subset Schema

• The UBL 2.0 Small Business Subset is one example of how a conformant subset may be specified through the use of a subset schema– All instances of UBL 2.0 SBS are instances of full UBL 2.0– The UBL 2.0 SBS schemas are pruned copies of the

normative UBL 2.0 schemas• Research is underway to demonstrate the pruned

schemas are provably correct proper subsets of the full schemas

Page 122: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 50

04/04/08

© Document Engineering Services 2008

Customizing UBL Specifying Extension Customizations

Page 123: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 51

04/04/08

© Document Engineering Services 2008

Extending UBL

• The UBL Library is 80/20.– Generic context of use, not specific.

• Extension involves some combination of:– Creating new ABIEs, BBIEs and ASBIEs.

– Extending cardinality• Making optional, mandatory.

– Creating new Unqualified Data Types.• Not derived from existing Data Types.

• Extended documents are a superset.– Should be UBL compatible.

• CODICE followed this approach.

Page 124: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 52

04/04/08

© Document Engineering Services 2008

Customizing UBL Extension using UBLExtension

Page 125: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 53

04/04/08

© Document Engineering Services 2008

UBLExtension

• Ensures conformance.– All instances will pass UBL schema validation.

• No inherent constraints.– Based on xsd:any.

• Use if nothing else fits.– Include legacy document formats.

• The ”black hole” of UBL.– Use with caution.

• Needs care when implementing.

Page 126: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 54

04/04/08

© Document Engineering Services 2008

UBLExtension Caveats

• Should be documented. – Specifying context.

• Should be registered.– Somewhere ?

• Should never be used for information that may properly be conveyed in standard UBL patterns elsewhere in the document.

• Extension content model should aim for UBL compatibility.– Conformance is not enough.

Page 127: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 55

04/04/08

© Document Engineering Services 2008

UBLExtension Structure

Page 128: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 56

04/04/08

© Document Engineering Services 2008

<Order> <ext:UBLExtension> <ext:ExtensionContent> <eac:BuyerExtendedCustomerParty> <ebc:TradeAssignedAccountID>T123356</ebc:TradeAssignedAccountID> <eac:ExtendedParty> <eac:PrimaryPartyName> <cbc:Name>IYT</cbc:Name> </eac:PrimaryPartyName> <eac:AlternativePostalExtendedAddress> <ebc:Postoffice>South Bridgtow</ebc:Postoffice> <eac:Address> <cbc:Postbox>2234</cbc:Postbox> <cbc:PostalZone>ZZ99 0AA</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </eac:Address> </eac:AlternativePostalExtendedAddress> </eac:ExtendedParty> </eac:BuyerExtendedCustomerParty> </ext:ExtensionContent> </ext:UBLExtension>… standard order details …</Order>

UBLExtension Sample

Can be anything in here

Normal UBL Order

Page 129: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 57

04/04/08

© Document Engineering Services 2008

OIOUBL UBLExtension Example

<ext:UBLExtensions>  <ext:UBLExtension>     <cbc:ID>WMP1</cbc:ID>     <cbc:Name>WMData</cbc:Name>     <ext:ExtensionAgencyID>EAI1</ext:ExtensionAgencyID>     <ext:ExtensionAgencyName>EAN1</ext:ExtensionAgencyName>     <ext:ExtensionAgencyURI>EAU1</ext:ExtensionAgencyURI>     <ext:ExtensionURI>urn:wmdata.dk:example</ext:ExtensionURI>     <ext:ExtensionReasonCode>OPT</ext:ExtensionReasonCode>     <ext:ExtensionReason>wmdata legacy invoice material

</ext:ExtensionReason>     <ext:ExtensionContent>      <wmp:LegacyExtension

xmlns:wmp="urn:urn:wmdata.dk:example">           ...legacy invoice stuff...       </wmp:LegacyExtension>     </ext:ExtensionContent>  </ext:UBLExtension></ext:UBLExtensions>

A common application

Registration details

Page 130: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 58

04/04/08

© Document Engineering Services 2008

• Identifies the legitimate elements and attributes in a document instance.

• Document definition:– List of all legitimate XPaths.– Can be very large!

• They can be generated from:– XSD schemas.– XML instances.– UBL spreadsheets.

• Used by UBL.– Small Business Subset definitions

XPath Specification

Page 131: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 59

04/04/08

© Document Engineering Services 2008

Sample XPath Specification

/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/16 1..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:StreetName16.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:BuildingName17.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:BuildingNumber18.1 0..1 /po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:CitySubdivisionName19.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:CityName20.1 0..1/po:Order/cac:BuyerCustomerParty/cac:Party/cac:Address/cbc:PostalZone21.1 0..1

Page 132: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 60

04/04/08

© Document Engineering Services 2008

Validating UBL Customizations

Page 133: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 61

04/04/08

© Document Engineering Services 2008

Validating XML Documents

• Model/Profile validation.• Content/Value validation.• W3C Schemas.

– Parser applications.

• Other schema languages.– Relax NG, ASN.1

• Programmable languages.– ISO Schematron (and stylesheets).– Coded applications (scripts/programs).

Page 134: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

62@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 62

04/04/08

© Document Engineering Services 2008

Identifying Customizations

• Profiles enable 'families' of customizations. – “Stand Alone Invoicing” is a profile for NES.

• Meaning the requirements for stand alone invoicing in the northern European context.

• Special BBIEs allow instances to identify their customization specifications:• 'UBLVersionID'

• the UBL version being customized. • 'UBLCustomizationID'

• an identifier (such as a namespace) for a specified customization of UBL.

• 'UBLProfileID' • an identifier (such as a namespace) for a specified profile of the

customization being used.

Page 135: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 63

04/04/08

© Document Engineering Services 2008

UBL Schema Validation

• A document schema defines all rules for validation.• Documents must pass this to be deemed UBL

conformant.• Degree of acceptability depends on number of business

rules tested.– Limited with W3C Schema

Page 136: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 64

04/04/08

© Document Engineering Services 2008

Validating UBL Conformance

Any Document

UBL Schema

UBL Conformant Document

Page 137: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

65@ Port Community Systems 2007

Designing Business Documents with UBL

Slide 65

04/04/08

© Document Engineering Services 2008

Validating Using XPath

• XPaths can be utilized to validate elements.• Can implement an exhaustive proof of conformance

and/or compatibility.• Conformance, by programmatically checking:

– all of the XPath entries of the subset are found in UBL.– none of the mandatory items in the UBL are missing from the

subset. • Extensions, by programmatically checking:

– none of the mandatory items in the UBL are missing from the superset.

Page 138: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 66

04/04/08

© Document Engineering Services 2008

Multi-Stage Validation

• Pre-conformance processes– Separate extensions.

• Conformance processes– Validate against UBL Schema

• Post-conformance processes– Validate restrictions.

• Experience suggests we will evolve toward this approach.

Page 139: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 67

04/04/08

© Document Engineering Services 2008

Validating Customizations

UBL Portion ofDocument

UBL Schema

Restricted XPaths

UBL Conformant Document

Valid CustomizedDocument

Any Document

Extension XPaths

Page 140: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 68

04/04/08

© Document Engineering Services 2008

<Order> <ext:UBLExtension> <ext:ExtensionContent> <eac:BuyerExtendedCustomerParty> <ebc:TradeAssignedAccountID>T123356</ebc:TradeAssignedAccountID> <eac:ExtendedParty> <eac:PrimaryPartyName> <cbc:Name>IYT</cbc:Name> </eac:PrimaryPartyName> <eac:AlternativePostalExtendedAddress> <ebc:Postoffice>South Bridgtow</ebc:Postoffice> <eac:Address> <cbc:Postbox>2234</cbc:Postbox> <cbc:PostalZone>ZZ99 0AA</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </eac:Address> </eac:AlternativePostalExtendedAddress> </eac:ExtendedParty> </eac:BuyerExtendedCustomerParty> </ext:ExtensionContent> </ext:UBLExtension>

<cac:BuyerCustomerParty> <cac:Party> <cac:PostalAddress> <cbc:PostalZone>ZZ99 1ZZ</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> </cac:Party></cac:BuyerCustomerParty></Order>

UBLExtension and Stub

Document without extensions

Document with extensions

Page 141: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 69

04/04/08

© Document Engineering Services 2008

Customized Document Architecture

• Use standard UBL document schema.– UBLExtension contains entire document to be processed.– Document body contains only the valid UBL component.

• This “stub” is validated by UBL schema.

• Data is duplicated.– Is this a problem?

• Always UBL conformant.– Consistent common data.

Page 142: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 70

04/04/08

© Document Engineering Services 2008

Summary and Feedback

Page 143: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 71

04/04/08

© Document Engineering Services 2008

Summary

• Background to Document Design

• UBL Design

• UBL Specification

• Designing Customizations

• Specifying Customizations

• Validating Customizations

Page 144: Designing Business Documents with UBL - OASIS Eventsevents.oasis-open.org/.../files/ComposingMeaningfulDocumentstWithU… · UBL Data Types • Unqualified Data Types: – Corresponding

Slide 72

04/04/08

© Document Engineering Services 2008

Towards a Universal Business Language

Thank You

謝 謝

ありがとう