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:
- Simple and complex order responses
- Order cancelation
- Dispatch advice (often known as a shipping notice)
- Receipt advice
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.
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
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.
- Participate in the discussion forum.
- Browse the huge amount of information put forth by the OASIS Universal Business Language TC, including the package of UBL 0p70 Library Content for public review. Get a deep look into the XML component design product with the work of the UBL Naming and Design Rules Subcommittee.
- Read this interview with Jon Bosak, a founder of both XMl and UBL, conducted in the early days of the UBL TC.
- As great as XML is, you should be at least basically familiar with ASN.1, which offers powerful and complex features for data representation. The UBL ASN.1 schemata provide useful examples.
- The most authoritative set of major geographical designations is ISO 3166, which has been in development since 1974.
- Check out all the previous installments of Uche Ogbuji's "Thinking XML" column.
- Find more information on the technologies covered in this article at the developerWorks XML zone.
- Evaluate software in the way that suits you best: Download a product trial, try a product online, or use a product in a cloud environment.
Dig deeper into XML on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.