Thinking XML: Universal Business Language (UBL)

Examining one of the foremost XML business formats

Universal Business Language (UBL) is an ambitious effort to unify the chaotic world of XML formats for business. Recently, the group behind UBL released the first work products for public review. In this article Uche Ogbuji takes a first in-depth look at UBL.

Uche Ogbuji, Principal Consultant, Fourthought, Inc.

Photo of Uche OgbujiUche Ogbuji is a consultant and co-founder of Fourthought Inc., a software vendor and consultancy specializing in XML solutions for enterprise knowledge management. Fourthought develops 4Suite, an open source platform for XML, RDF, and knowledge-management applications. Mr. Ogbuji is a computer engineer and writer born in Nigeria, living and working in Boulder, Colorado, USA. You can contact Mr. Ogbuji at uche@ogbuji.net.



01 February 2003

Develop skills on this topic

This content is part of a progressive knowledge path for advancing your skills. See Introduction to Universal Business Language

The Universal Business Language (UBL) OASIS technical committee, as I reported in a previous column, was announced on October 17th 2001. UBL is a library of documents for business transactions, designed from the point of view of small- to medium-sized organizations as well as big organizations. The committee behind UBL (UBL TC) offers an excellent summary of their ambition:

The purpose of the UBL TC is to develop a standard library of XML business documents (purchase orders, invoices, etc.) by modifying an already existing library of XML schemas to incorporate the best features of other existing XML business libraries. The TC will then design a mechanism for the generation of context-specific business schemas through the application of transformation rules to the common UBL source library. UBL is intended to become an international standard for electronic commerce freely available to everyone without licensing or other fees.

The UBL TC recently produced the first major product for public review: UBL Library Content 0p70. You can download a review package from the home page (see Resources). I encourage anyone who is interested to have a close look at UBL and send any comments to the UBL TC. This work is royalty-free and all attempts have been made to avoid intellectual property encumbrances on it. It is a rare public benefit to have such an important work so freely available, and we all have much to gain by advancing it. The materials in this release are not in final form: They are expected to be finalized around the middle of this year, and even then only a fraction of the eventual UBL material will have been completed, so there is plenty of time to comment and contribute. You may want to review recent articles in this column to get a general background on UBL and similar initiatives, and some of the core issues driving such initiatives.

A UBL fly-over

The first thing to note about UBL is that it is very large and very comprehensive. The initial release comes as a 5.6 MB ZIP file, and covers what are likely the most common business forms (and perhaps the most often rendered as XML documents): the trading cycle from order through invoice between buyer and seller. Specifically, it includes specifications for the following transactions:

  • Order
  • Simple and complex order responses
  • Order cancelation
  • Dispatch advice (often known as a shipping notice)
  • Receipt advice
  • Invoice

A set of basic business concepts provides the building blocks for the above specifications. These are called the Basic Business Information Entities (BBIEs) and are expressed as Core Component Types (CCTs) in a common UBL schema. In addition to the BBIEs, different specifications define their own specialized Business Information Entities (BIEs), which make up the UBL conceptual model, organizing business concepts into classes and associations. The UBL conceptual model is based on other modeling systems such as Unified Modeling Language (UML) and Entity/Relational modeling. In fact, UBL uses UML to provide a high-level view of the conceptual models.

All the nitty-gritty details, however, are managed in spreadsheets. Yes. Spreadsheets. Those classic paragons of user-friendly information management. The UBL TC found spreadsheets most versatile and manageable for the purpose of maintaining the concept details. The UML class diagrams are generated from these spreadsheets. The spreadsheets are provided in Microsoft Excel format, but I had no problem opening them with OpenOffice.org. The UML diagrams are provided as simple GIFs.

The rules of the game

These conceptual models form the basis for XML schemata for related business documents. The process of deriving these schemata is very rigorous. The UBL TC spawned a subcommitte for UBL Naming and Design Rules (NDR), which created a comprehensive (73-page) document with rules for naming and overall design in UBL XML components. These rules are established to ensure consistency across the broad spectrum of XML components included in UBL. An example of a naming rule for UBL is:

Names for XML constructs must use camel-case capitalization, such that each internal word in the name begins with an initial capital followed by lowercase letters (example: AmountContentType)....

An example of a design rule for XML is:

For every complex type definition based on an object class, its content model must be defined such that it reflects each property of the object class as an element declaration, with its cardinality and positioning within the content model determined by the details of the syntax-neutral model.

The data typing features in the above snippet refer to W3C XML Schemas (WXS) data types, and indeed WXS is chosen as the normative schema language of UBL. As a secondary format the document types (also known as transfer formats) are defined in Abstract Syntax Notation number One (ASN.1) schemata. ASN.1, which has been around since the mid-1980s, is an ISO standard for specifying data formats used in communication protocols. The ASN.1 schemata for UBL open it up to the large array of ASN.1 tools, and also allow for very efficient encoding of UBL using ASN.1's Packed Encoding Rules, which are effectively a binary encoding, and thus very compact. Indeed, in many XML discussions, whenever XML's verbosity comes up and a binary serialization of XML is suggested, the wiser contingent always suggests mappings to ASN.1 for such cases. The UBL TC heeded this advice.


Business document look and feel

The public review package also comes with a set of XSL style sheets developed by Crane Softwrights Ltd. for converting UBL documents to human-friendly HTML or PDF (using XSL-FO). The results look just like the sort of document a truck driver might wave at a security guard in order to gain access to a loading dock and drop off goods. This package of style sheets also contains sample XML UBL documents (in the "test" subdirectories). Listing 1 is an excerpt from one of them, an example of an Order transaction.

<po:Order xmlns:po="urn:oasis:names:tc:ubl:Order:1.0:0.70"
          xmlns="urn:oasis:names:tc:ubl:CommonAggregateTypes:1.0:0.70">
  <ID>4500004875</ID>
  <IssueDate>2001-12-17</IssueDate>
<!-- Cut to the buyer info -->
  <BuyerParty>
    <ID>R300</ID>
    <PartyName>
      <Name>IDES Retail INC US</Name>
    </PartyName>
    <Address>
      <ID></ID>
      <Street>West Chester Pike</Street>
      <CityName>Parsippany</CityName>
      <CountrySub-EntityCode listID="3166-2" listAgencyID="ISO">NY</CountrySub-EntityCode>
      <Country>
        <Code listID="3166-1" listAgencyID="ISO">US</Code>
      </Country>
    </Address>
    <BuyerContact>
      <ID></ID>
      <Name>Joe Bloggs</Name>
    </BuyerContact>
  </BuyerParty>
<!-- Cut to the order line -->
  <OrderLine>
    <BuyersID></BuyersID>
    <Quantity unitCode="unit">10</Quantity>
    <Item>
      <ID>R100016</ID>
      <Description>Tuner X300</Description>
      <BasePrice>
        <PriceAmount currencyID="USD">350</PriceAmount>
      </BasePrice>
    </Item>
<!-- Cut to end -->
  </OrderLine>
</po:Order>

UBL leans heavily on concept IDs and standardized vocabularies. Transaction documents have unique numerical IDs, and all BIEs can have associated IDs. The Country/Code element demonstrates a reference to a standard vocabulary: ISO 3166, the International Country Code Standard. In general, though, you can see that the XML format is rather straightforward.


Summary

The last time I discussed UBL in this column, I wondered whether it could be The One that helps unify the chaotic world of XML vocabularies for business. UBL certainly has a lot of potential to be the dominant format. It is very rigorously defined, takes advantage of other work where appropriate, and encourages broad adoption and contribution by remaining royalty-free. It is also in very active development at a time when work on so many other such systems seem to have stagnated.

On the other hand, a lot of work is needed to extend UBL to all the many different types of transactions used in business. For example, the ANSI X12 and UN/EDIFACT flavors of EDI each define over 300 transaction sets, many of which will have to be made available for UBL before some industries are likely to start using it in earnest. Certainly, much overlap exists in such vocabularies that can be managed with UBL's comprehensive core model and extensibility, but undoubtedly much work remains to fulfill the ambitions of the UBL TC. Nevertheless, UBL offers many useful products that will be available for immediate use once it is finalized later this year:

  • A core set of transaction formats for an initial set of common business forms
  • A reusable concept model and vocabulary
  • Some design practices that borrow the best ideas from a variety of disciplines
  • A good amount of code to bootstrap applications for processing UBL

I encourage you to have a closer look yourself, and share your thoughts with the UBL TC.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into XML on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=12214
ArticleTitle=Thinking XML: Universal Business Language (UBL)
publish-date=02012003