WSEDI Level 1
Apr 12th, 2007 by Ricker
Enriched Representation
The WS-EDI Level 1 representation adds human-readable metadata to the Level 0 representation. The human-readable metadata is not necessary for parsing EDI as XML, so it cannot be considered part of the “minimum necessary” in Level 0. However, the Level 1 human-readable metadata is exceedingly important to making EDI documents usable and accessible for programmers and users alike.
Name attribute
Level 1 provides an enriched representation of the EDI message by providing the human readable metadata. Each segment, element and composite is given a name attribute that provides a description of the segment, element or composite’s purpose.
<segment code="AST" name="Animal Reproductive Status"> ... <element seq="AST05" code="344" name="Unit of Time Period or Interval">
Means attribute
Many EDI elements use two-letter codes to represent information. Level 1 enriched representation provides the meanings of these codes with the means attribute, such as:
<element seq="AST05" code="344" name="Unit of Time Period or Interval" means="Calendar">DA</element>...
In this example, the code “DA” in a X12 344 element means “Calendar”. The code “DA” in another element may have a completely different meaning.
Only elements that have code values have a means attribute. For instance, an element that contains a date or place name would not need a means attribute.
Code attribute
In Level 0, only the segment has a code attribute. In Level 1, the element and composite must retain their seq attribute. They should have a code attribute.
Localization
With WS-EDI, all the metadata can be translated into other languages. In the examples we provided above, all the metadata is in US English. We could just as easily insert Spanish or French into the name and means attributes. These attributes are only used for human-readable display. Programs key off the code and seq attributes.
Developers should use the xml:lang attribute at the document root to designate the language of the WS-EDI document’s metadata, as in
<wsedi xml:lang="EN">...
Example documents
- An UN EDIFACT document and its Level 1 representation.
- An ANSI X12 document and its Level 1 representation.
Leave a Reply
You must be logged in to post a comment.