EDML - Electronic Data Markup Language

EDML - Electronic Data Markup Language Specification

Revision History
Date:  19/1/98
Version:   0.6
Comments:  first full draft; for comment

© I A Galbraith and D W Galbraith 1998. EDML is a trademark of OMS Services Ltd. Permission is given for this document to be copied or distributed in whole or in part subject to explicit acknowledgement being given in every case to the authors as the source and copyright owners of the material.

3. EDML SYNTAX

An EDML message is structured as a set of NAME/VALUE pairs, as are used within HTML Web forms.  (NB This does not mean that EDML Messages must be based upon Web forms.)  NAME and VALUE in each case must conform to HTML, ie must be HTML CDATA strings.

EDML syntax is described in Augmented Backus-Naur Form, as defined in Internet RFC 2068.

"char1".."char2" in the definitions implies any character in the ASCII collation sequence from char1 to char2, inclusive.

3.1 EDML/GENERIC

EDML/GENERIC refers to the generic EDML syntax, defined here.
 
CHAR= any character allowed by HTTP (see Internet RFC 2068) 
UPALPHA= <any US-ASCII uppercase letter "A".."Z"> 
LOALPHA= <any US-ASCII lowercase letter "a".."z"> 
ALPHA= UPALPHA | LOALPHA 
DIGIT= <any US-ASCII digit "0".."9"> 
ALPHANUM= ALPHA | DIGIT 
EntityDelimiter= "-" ;default 
GroupDelimiter= "." ;default 
InstanceDelimiter= "@"  ;default 
Message= Header Body Trailer 
Header= 1*HeaderDataItem 
Body= 1*EntityGroup 
Trailer=  TrailerDataItem 
HeaderDataItem= "EDML." HeaderCode "=" <Value depends on Header Code> "&" 
HeaderCode=  "TYPE"  |  ;EDML Type name, eg "EDIFACT", "X12", "HL7", "GEDCOM"... 
"TYPVER"  |  ; EDML Type version, eg "97A" for EDML/EDIFACT based  upon EDIFACT version 97A 
"MESS"  |  ;EDML Type Message Type, eg "PURORD" if the Message Type is Purchase Order 
"MESSVER" ;Message Type version, eg "1.0" 
TrailerDataItem= "EDML.END=&" 
EntityGroup= 1*DataItem 
DataItem= Name "=" Value "&" 
Name= 0*(EntityGroupID GroupDelimiter) EntityGroupID 
EntityGroupID= 0*(EntityID EntityDelimiter) EntityID 
EntityID= EntityCode [InstanceDelimiter (InstanceCode | [InstanceCode] InstanceDelimiter EntityTag)] 
EntityCode= 1*DIGIT ;default
InstanceCode= 1*DIGIT ;optional if only one occurrence
EntityTag= 1*CHAR ;depends on Source Standard 
Value= 0*CHAR ;may be null 
 

"Name" is NAME as used in NAME/VALUE pair.  It is recommended that the characters used with an EDML Name be restricted to A..Za..z0..9, which are not ‘escaped’ in HTTP (and which exclude the EDML default delimiter characters), for ease of visual interpretation of Names, but this is not essential.

"Value" is any acceptable HTML character string, including a null string (ie "").  Characters will be ‘escaped’ (ie to the hexadecimal equivalent) as defined in the HTML specification.

"EntityCode" is the unique sequential number allocated to each Source Standard Entity for a particular EDML Type.  This number is sequential to ensure correct ordering of data items when translating to source message format (eg EDML to EDIFACT).  An EntityCode is unique to a particular Entity within a higher level structure (or at the highest level), but may be re-used for other Entity Types, since each Entity Type is separately identified within EDML (either by its position within an EDML EntityID string, or by being in a separate EntityID.   Also, more than one Entity of the same type might appear within a higher level entity, but the EntityCode for each will be different so that each appearance is uniquely identified.

· For example, an ‘Address’ entity could have several ‘AddressLines’.  Each AddressLine might be identified in the Source Standard by the same identifier (ie the EntityTag), but in EDML, each would have its own EntityCode.  Suppose ‘Address’ has the EntityCode "4"; the Address Lines could be identified as 4.1, 4.2,  4.3, etc.   The "1", "2", and "3" indicating the first second and third component Entities of the Entity identified by the "4".  The "4" itself might identify the fourth component of a higher level entity, could be the unique identifier of an entity at the highest level, and/or could be nested within another entity.  For example:

"InstanceCode" is used to confer uniqueness on a repeated occurrence of an Entity.  It will generally be a sequential number, starting from 1, but this is not essential if a Source Standard uses a different scheme.

Cross-References:  Because each Name is unique within an EDML message, inserting an EDML Name within the Value field of a data item can be used to refer to the Data Item which has that Name.  This simplifies the creation of cross-references, for example in EDML/GEDCOM.