<?xml version="1.0"?>
<?xml-stylesheet href="rep-xml.css" type="text/css"?>
<!DOCTYPE report SYSTEM "report.dtd">

<!--report xmlns:html="http://www.w3.org/TR/REC-html40"-->
<report xmlns="http://www.eccnet.com/namespaces/ecc-namespace"
 xmlns:html="http://www.w3.org/TR/REC-html40">

<front><title>Guidelines for using XML for Electronic Data Interchange 
</title><version>Version 0.05</version><date>25th January
1998</date><author><name><first.name>Martin</first.name><last.name>
Bryan</last.name></name><affiliation><organization>The SGML
Centre</organization></affiliation></author><author><name><first.name>Beno&#237;t
</first.name><last.name>Marchal</last.name></name></author><author><name><first.name>
Norbert H
</first.name><last.name>Mikula</last.name></name></author><author><name><first.name>Bruce
</first.name><last.name>Peat
</last.name></name></author><author><name><first.name>David RR
</first.name><last.name>Webber</last.name></name></author><copyright>Copyright
&#169; 1998. XML/EDI Group. All rights reserved, no part of this document may
be commercially reproduced in part or in whole without consent and prior
approval. </copyright><changes><list><unlist><item>Addition of figures used in
presentation to W3C in January 1998.</item>
<item>Brief explanation of differences in business processes between
client-centric electronic business transactions and server-centric web
retailing.</item>
<item>Rules templates now linked to messages via a processing instruction
rather than XLL simple link (for conformance to way in which style sheets are
linked to the message.</item>
<item>The examples in Annex A have been updated to show an XML book order that
can be displayed using Micorsoft&apos;s MSXSL beta add-on to Internet Explorer
4.0. On-line link to demonstration software now provided. 
</item></unlist></list></changes></front><body><section><title>1. Purpose &amp;
Goal of the XML/EDI Guidelines</title><p> Put simply, the goal of XML/EDI is to
deliver unambiguous and durable business transactions via electronic means.</p>
<p> Associated with this is a goal to establish a standard for commercial
electronic data interchange that is open and accessible to all, and which
delivers a broad spectrum of capabilities suitable to meet the full breadth of
business needs.</p>
<p> To achieve this requires the use of a methodology that it is not only
extensible enough to meet future requirements but also adaptable enough to
incorporate new technologies and requirements as they emerge. To ensure broad
adoption the technology selected needs to be widely and freely available. The
Extensible Markup Language (XML) developed by the World Wide Web Consortium
(W3C) provides such a freely available, widely transportable, methodology for
well-controlled data interchange.</p>
<p> XML was designed principally for the exchange of information in the form of
computer displayable &quot;documents&quot;. Not all commercial data is
interchanged in a displayable format. In particular data designed for
electronic data interchange typically needs to be processed before it can be
displayed. For this to be possible the data must be mapped, using some form of
template, to a set of processing rules. These XML/EDI guidelines provide a
standardized way in which such rules templates can be added to interchanged
data.</p>
<p> These XML/EDI guidelines begin by formally defining the terms used in the
text. This is followed by an impact statement that makes predictions from
various viewpoints. The guidelines then give a background on the tools and
standards which XML/EDI is built.</p>
<p> Note: These guidelines form the basis for development work on XML/EDI. They
form an precursor to a formal &quot;Specification of an EDI Application for
XML&quot;. As a document designed to be a lighting rod for ideas, this working
document has been, and will continue to be, released in draft form. Comments on
this draft should be sent to the XML/EDI working group at
<html:a href="mailto:@xml-edi@riv.be">xml-edi@riv.be.</html:a>
</p></section><section>
<title><html:a name="Definitions">2. Definitions for XML/EDI</html:a></title>
<p> Many people use the term EDI to refer to the set of messages developed for
business-to-business communication as part of the United Nations Standard
Messages Directory for Electronic Data Interchange for Administration, Commerce
and Transport (EDIFACT). EDIFACT messages are transmitted in compressed form,
using predefined field identifiers, which must occur in a predefined sequence.
While EDI is, strictly speaking, wider in scope than EDIFACT, for the purposes
of these guidelines EDI will be used in this restricted sense when not
otherwise qualified.</p><p> The basic unit of information in an EDI message is
the <definition>data element</definition>. For an EDI invoice, each item being
invoiced would be represented by a data element. Data elements can be grouped
into <definition>compound data elements</definition>, and data elements and/or
compound data elements may be grouped into <definition>data
segments</definition>. Data segments can be grouped into
<definition>loops</definition>; and loops and/or data segments <emphasis>form
business documents</emphasis>.</p><p> Electronic commerce has been defined in
the European Workshop on Open System&apos;s <cite>Technical Guide on Electronic
Commerce</cite> (EWOS ETG 066) as &quot;Electronic exchange of data to support
business transactions, i.e. the exchange of value through the delivery of a
product from a seller to a buyer&quot;. As such it encompasses much more than
what has been possible using traditional methods of Electronic Data Interchange
(EDI) such as EDIFACT. Electronic commerce is defined by EWOS as covering
activities such as marketing, contract exchange, logistics support, settlement
and interaction with administrative bodies (e.g. tax and custom data
interchange). Electronic commerce covers all industrial and service operations,
including services such as insurance, healthcare, travel and interactive home
shopping.</p> <p> The EDIFACT standards define whether data segments are
mandatory, optional, or conditional, and indicate whether, how many times, and
in what order a particular data segment can be repeated. For each EDI message,
a <definition>field definition table</definition> exists. For each data
segment, the field definition table includes a key field identifier string to
indicate the data elements to be included in the data segment, the sequence of
the elements, whether each element is mandatory, optional, or conditional, and
the form of each element in terms of the number of characters and whether the
characters are numeric or alphabetic. Similarly, field definition tables
include data element identifier strings to describe individual data elements.
<definition>Element identifier strings</definition> define an element&apos;s
name, a reference designator, a data dictionary reference number specifying the
location in a data dictionary where information on the data element can be
found, a requirement designator (either mandatory, optional, or conditional), a
type (such as numeric, decimal, or alphanumeric), and a length (minimum and
maximum number of characters). A <definition>data element
dictionary</definition> gives the content and meaning for each data element. 
</p>
<p> Originally, EDI translation software was developed to support a variety of
private system formats. Most often, the sender and receiver were required to
contract in advance for a tailored software program that would be dedicated to
mapping between their two types of datasets. Each time a new sender or receiver
was added to the client list, a new translation program would be needed by the
new party to format their data to conform to the standards in use by the
participants. Of course, this becomes expensive. Such static systems do not
easily allow synchronization of business transactions in distributed business
processes that involve global rules, but with participants and actions that are
not predetermined. To solve these issues it is desirable to develop automated
tools and techniques that are easy to use and allow decomposition of
transactions in actions to be performed locally and mapping of local actions
onto efficient protocol exchanges.</p><subsection><p>
<fig><title>The Electronic Enterprise</title><html:img
alt="The Electronic Enterprise" src="graphics/overall.gif"/>
</fig></p><p> The concept of the Electronic Enterprise requires a transition
away from paper form based EDI. Key concepts that are required are the
encapsulation of agreed sets of <definition>business rules</definition> (in EDI
parlance the Implementation Guidelines) and also mechanisms to handle state and
flow control (such as those provided by hyperlink anchors in HTML files). Also
message sets must be able to handle partial information, where the complete
information is not yet available, or simply is not required for the particular
business process. This allows different parts of an enterprise to selectively
contribute only the information that is germane to their business functions. 
</p> <p> A fundemental difference between the proposals in these XML/EDI
Guidelines and those found in other proposals for XML-based web retailing, such
as those covered in the Open Trading Protocol (OTP), is the client-centric
nature of the business processes, as contrasted with the server-centric nature
of electronic retailing. To distinguish these two terms, we use the term
&quot;Electronic Business&quot; to refer to the processes of fulfilling
customer requirements through the application of negotiated business processes
leading to the supply of manufactured goods to retailers and service providers,
and &quot;Web Commerce&quot; to describe the process of selling manufactured
goods to consumers.</p> <p> Electronic business is client-centric in that is
starts with a specification of a client&apos;s requirements, rather than a
statement of what the supplier has to offer. The specification of requirements
gets sent to a number of potential suppliers, who are asked to tender for the
business by a predefined date/time. The purchaser is, as a result of this
process, provided with more than one choice, and must determine which quotation
to accept. This may require a period of contract negotiation to ensure that
adequate terms and conditions, including delivery criteria, are met. This may
require a looping of the processes, with a need to cross-refer between
successive documents.</p> <p> Once the purchaser has selected a supplier the
business processes involved are very similar to those involved in web commerce,
but there are subtle differences. For example, electronic payment before
delivery is unlikely to be required for electronic business transactions.
Instead of being an integral part of the negotiation phase, with payment being
made at the time the order is placed, payment in the electronic business
scenario is a separate process that occurs immediately after delivery. This
introduces concepts such as statements, which do not occur in web commerce
scenarios.</p></subsection><subsection><title>

<html:a name="standards">The standards involved in XML/EDI</html:a>
</title><p> XML
is the Extensible Markup Language subset of ISO&apos;s Standard Generalized
Markup Language (SGML) developed by the World Wide Web Consortium (W3C) SGML on
the Web working party during the latter half of 1996 and early 1997. The formal
recommendation was submitted for approval by W3C members on 8th December 1997. 
</p> <p> On 10th September 1997 a proposal for a new form of XML Style Language
(XSL), which incorporates the ECMAScript standardized variant of JavaScript,
was published by a consortium led by Microsoft, ArborText and the Inso
Corporation. This version of the XML/EDI specification uses the power provided
by this new advanced language combination to show how control of XML/EDI
document processes can be achieved in a distributed manner.</p> <p> In October
1997 a specification for a formal Document Object Model (DOM) for XML documents
was published by W3C. This model provides a standardized API for XML-based
tools.</p> <p> Combining XML and EDI to develop XML/EDI suggests that the main
method of capturing and coding EDI information will be through XML-coded
electronic forms. At present the form handling characteristics of XML are yet
to be fully agreed (agreement is expected during 1998). To allow interaction
with existing sytems the XML/EDI Guidelines show how EDIFACT messages can be
generated from XML/EDI forms, and vice versa.</p> <p> XML/EDI isn&apos;t
creating a new standard. XML/EDI is defining how companies can use current
standards to solve their business problems.</p>
</subsection></section><section><title><html:a name="Scope">3. Scope of
XML/EDI</html:a>
</title><p> Detail of the scope of XML/EDI, and the impact it is expected to
have on business communities, are covered in
<html:a href="http://www.geocities.com/WallStreet/Floor/5815/start.htm">
Introducing XML/EDI...</html:a>. To help readers of this document to appreciate
the differences in practice between traditional EDIFACT-based web transactions
and XML/EDI this section discusses some of the differences between traditional
business-to-business electronic data interchange systems and the new breed of
interactive electronic business tools being provided through the Internet.</p>
<subsection><title><html:a name="EDI">Business-to-business Electronic Data
Interchange</html:a></title><p> Electronic Data Interchange (EDI) has been used
for business-to-business communication for almost a quarter of a century.
Initial efforts involved inter-company agreements on how to exchange commercial
data, initially as information stored on tape and later as messages sent over
dedicated data lines. To avoid having to use different protocols to move data
between different companies, various industry groups identified sets of data
that could form the basis of individual agreements. The industry groups also
sought to agree the format in which fields in such data sets were interchange
so that a company only needed to develop one methodology for decoding
information received without resource to human intervention.</p> <p> The
Achilles Heel for this approach has always been two fold. Firstly, companies
require flexibility in, and wish to deviate from, doctrinaire standards that do
not fully meet their business needs. Secondly, because the standards are
pre-ordained there is no mechanism provided to transfer processing rules and
associated information. It is assumed that the data meets the defined
constraints and if not, has been duly modified to conform. This means that
companies must conduct exacting analysis to determine precisely how they are
going to move their business data to and from the predefined EDI formats. The
cost of these constraints has been borne as excessively long and complex
implementation cycles for traditional EDI systems.</p> <p> The world has
changed from thirty years ago, and now requires more dynamic and vibrant
services that match the organized yet ad hoc nature presented by both modern
business practice, and particularly its manifestations on the Internet. The
Internet is re-writing the rules on how people interact, buy and sell, and
exchange goods and services. In particular the Internet is showing us that EDI
is not only relevant for business-to-business communications. The same concepts
are also relevant for all consumer-to-supplier relationships, whether the
consumer is an end-user, a manufacturer, a service organization such as a
hospital or a hotel, a governmental organization or a virtual organization.</p>
<p>
<fig><title>Electronic Commerce in 1997</title><html:img
alt="Electronic Commerce at end of 1997" src="graphics/today.gif"/>
</fig></p></subsection><subsection><title><html:a name="Interactive">Electronic
business transactions</html:a></title><p> With the arrival of the Internet in
the last decade of the 20th century the pattern of electronic commerce has
dramatically changed. In particular, the Internet has introduced many new ways
of trading, allowing interaction between groups that previously could not
economically afford to trade with one another.</p> <p> Whereas previously
commercial data interchange involved mainly the movement of data fields from
one computer to another, without human intervention, the new model for
web-based commerce introduced by the Internet is typically dependent on human
interaction for the transaction to take place. The new model is based
principally on the use of interactive selection of a set of options, and on the
completion of &quot;electronic forms&quot;, to specify user requirements.</p>
<p> As this new model develops there has been a fundamental shift in how data
used for commerce should be processed. The original
create--&gt;transmit--&gt;receive--&gt;process cycle of information processing,
using individual programs, is beginning to be replaced by the concept of active
objects which have inherent processes associated with them, based on the class
of information they contain. Today an invoice may no longer contain a copy of
the information stored in the database it was generated from: instead it
contains a pointer that says where it expects to get the data from, and this
data will be fetched from its managed source each time the invoice is
processed.</p> <p> Such interactive programs require us to review the
underlying philosophy of electronic commerce. What are the characteristics of a
system designed for &quot;electronic business transactions&quot; in an
international marketplace?</p> <p> To be truly interactive you need to be able
to:<list><numlist> <item>Understand the business concepts represented in the
interchanged data. </item><item>Apply business-specific rules to the
interchanged data to identify what class(es) of data it contains and formulate
appropriate responses.</item></numlist></list></p>
<p> To do this you need to be able to:<list><numlist> <item>identify the role
and syntax of each piece of interchanged data </item><item>identify the source
of each shared piece of information </item><item>identify which pieces of
information should occur in each interchanged set of data and, if relevant, the
order in which they occur in a particular message stream </item><item>identify
who is responsible for creating, transmitting, receiving and processing each
message, and which programs should be used to control each of these processes 
</item><item>identify when a message should be moved from one stage of the
interchange process to another </item><item>identify which rules should be used
to check that the relevant forms of interchange have taken place and to move
data from one presentation template to another.</item></numlist></list>
</p><p> Because these interactions can be complex, and potentially require
specialized knowledge, the rule templates can be supplemented by XML/EDI data
manipulation agents (DataBots) to ensure that users can express their
requirements in high-level, natural language, terms. DataBots automatically
create appropriate rule templates and XML syntax to match user requirements and
broker the entire interchange.</p> <p> When DataBots are being used XML/EDI is
identified as being robot generated by adding an R to its name to become
XML/EDI-R.</p> <p> At this point in time the ECMAScript subset of the Java
programming language provides the vehicle that permits the DataBots to be
deployed and received along with XML/EDI messages.</p><p>
<fig><title>Future based on XML/EDI</title><html:img
alt="Future based on XML/EDI" src="graphics/future.gif"/>
</fig></p></subsection></section><section><title><html:a name="Base">4. Base
Technologies of XML/EDI</html:a></title><p> XML/EDI is a synthesis of many
concepts. XML/EDI: <list><unlist> <item>uses the XML protocol as its &quot;data
interchange modelling&quot; layer </item><item>uses the XSL protocol as its
&quot;presentation&quot; layer </item><item>can be integrated with traditional
methods of Electronic Data Interchange (EDI) </item><item>can be used with all
standard Internet transport mechanisms such as IP routing, HTTP, FTP and SMTP 
</item><item>allows for document-centric views and processing methodologies 
</item><item>uses modern programming tools such as Java and ActiveX to allow
data to be shared between programs </item><item>uses agent technologies for
data manipulation, parsing, mapping, searching...</item></unlist></list></p>
<p> XML/EDI can be seen as the fusion of five existing technologies:
<list><numlist> <item>Web data interchange based on the new XML specification 
</item><item>Existing EDI business methods and message structures </item>
<item>Knowledge templates that provide process control logic </item><item>Data
manipulation agents (DataBots) that perform specialist functions </item>
<item>Data repositories that allow relationships to be maintained. 
</item></numlist></list></p><p>
<fig><title>The Five Technologies of XML/EDI </title><html:img
alt="The Five Technologies of XML/EDI" src="graphics/five.gif"/>
</fig></p><subsection><title><html:a name="Why">Why use XML?</html:a></title>
<p> XML will be native language for the next generation of most of the popular
WWW browsers. XML/EDI seeks to leverage the work and support (technically and
financially) which XML is receiving. With traditional EDI, the infrastructure
was built from the ground up, without being able to share resources with other
programs. This paradigm is no longer appropriate in today&apos;s world of
shared software development. By adopting XML/EDI, the EDI community can get to
share the cost of extension and future development.</p> <p> In 1986 the
International Organization for Standardization (ISO) published an international
standard defining a Standard Generalized Markup Language (SGML) that allowed
its users to: <list><unlist> <item>identify the role and syntax of each piece
of data in an interchanged document </item><item>identify which pieces of
information should occur in each interchanged set of data and, if relevant, the
order in which each such element should occur in a particular document </item>
<item>identify which programs should be used to control each of these
processes.</item></unlist></list></p> <p> SGML has formed the basis of many of
the large, multinational, documentation projects that have developed in the
decade since its publication. It also formed the basis for the formalization of
the HyperText Markup Language (HTML) that led to the formation of the World
Wide Web of documentation that has become available on the Internet.</p><p> Key
to the success of HTML was the development of the concept of Uniform Resource
Locators (URLs) that allow users to identify the source of each piece of shared
data in a consistent manner. Whilst the original concept has limitations as to
the granularity of data access, its universality has greatly improved
computer-to-computer communications.</p> <p> In July 1996 the World Wide Web
Consortium (W3C) set up a working group to study how SGML could be simplified
to allow for its efficient use over the Internet. The result was the
development of an Extensible Markup Language (XML) that combined the expressive
power of SGML with the Internet-aware functionality of HTML.</p> <p> XML
provides an ideal methodology for electronic business because: <list><unlist> 
<item>XML allows message type creators to clearly identify the role and syntax
of each piece of interchanged data using a definition that is both machine
processable and human interpretable </item><item>XML allows message type
creators to identify the source of each shared structure using an Internet
Uniform Resource Locator </item><item>XML allows message type creators to
optionally identify which pieces of information should occur in each
interchanged set of data and, where relevant, the order in which individual
fields should occur in a particular message stream </item><item>XML documents
can be given metadata fields that can be used to identify who is responsible
for creating, transmitting, receiving and processing each message, and can have
built-in facilities for identifying the storage points of programs that should
be used to control processes </item>
<item>XML can make use of facilities provided by the latest version of the
Internet HyperText Transfer Protocol (HTTP), which can identify when a message
should be moved from one stage of the interchange process to another, and to
check that the relevant forms of interchange have taken place. 
</item></unlist></list></p></subsection><subsection><title>
<html:a name="Integrating">Integrating XML with EDI</html:a></title>
<p> XML can be integrated with existing EDI systems by: <list><unlist> 
<item>providing application-specific forms that users can complete to generate
EDI messages </item><item>generating EDI message formats for transmission
between computers over the Internet, or through existing value-added networks
(VANs) </item><item>allowing data received in EDI format to be interpreted
according to sets of predefined rules for display by the receiver on
standardized browsers using a user-defined template, rather than having to rely
on specially customized display packages.</item></unlist></list>
</p> <p> XML can extend existing EDI applications by: <list><unlist> 
<item>allowing message creators to add application-specific data to
standardized message sets where required </item><item>allowing message creators
or receivers to display the contents of each field in conjunction with
explanatory material which is specific to the application and the language
preferences of the user </item><item>allowing system developers to customize
the help information associated with the data for each field </item>
<item>allowing field value checking to be integrated with checks on the
validity of the data with respect to information stored on local databases. 
</item></unlist></list></p>
</subsection></section><section><title><html:a name="Components">5. XML/EDI
Components</html:a></title><p> The following figyre illustrates the main layers
of a fully integrated XML/EDI system.</p>
<fig><title>The layers of an XML/EDI system</title><html:img
alt="XML/EDI layers" src="graphics/layers.gif"/></fig>
<p> The XML/EDI specific components are built on top of existing standards for
transmitting and processing XML-encoded data. These standards define shared
features such as: <list><unlist> <item>the standard Internet file
storage/naming and data transport mechanisms </item><item>file and message
transfer formats </item><item>the syntax of data coded in XML </item><item>the
way in which XML files can be validated by an XML parser or document object
model generator </item><item>the way in which XSL presentation and data
evaluation scripts can be associated with parsed objects </item><item>the use
of rules and data management robots to manage application and repository
interfaces.</item></unlist></list></p> <p> XML parsers, document browsers, page
markup programs and related software functions are available of-the-shelf
today. XML/EDI isn&apos;t, therefore, a new standard; it simply provides a
framework for using existing standards to tackle existing problems in a new
way.</p> <p> XML/EDI specific components will either manifest themselves as
built-in components into existing products, plug-in programs to existing tools
or standalone applications. It is anticipated that new applications will be
created from the spark of XML/EDI implementation.</p>
<subsection><title><html:a name="Types">Types of applications</html:a></title>
<p> The following examples of the type of facilities that could be built into
an XML/EDI implementation isn&apos;t comprehensive, but a starting place for
discussion: <list><unlist> <item>Lexicon Repositories (holding EDIFACT, X12, or
BSI dictionaries, DTDs and common business objects) </item><item>XML/EDI Data
Manipulation Agents (DataBots) - which enable rule-driven processing </item>
<item>XML/EDI Business Objects (predefined object processors identified by XSL
scripts) </item><item>XML/EDItors used for the creation and completion of
form-based EDI messages </item><item>XML/EDI extensions for message stores 
</item><item>Search Agents which recognize XML/EDI specific tagging and are
able to request data from both private and public message stores (e.g. through
Web interfacing) </item><item>Trading Partner Pages - extensions of
&quot;yellow pages&quot;, but with verified integrity of characteristics. 
</item> </unlist></list></p><p> Each of these options is explained in more
detail in the following subsections. </p><subsection1><title><html:a
name="Repositories">Lexicon Repositories</html:a></title>
<p> A primary component of XML/EDI is its dynamic common language and syntax
repository. The various type of repositories include: <list><unlist> <item>DTD
Repositories </item><item>Segment/Element Repositories (e.g. EDIFACT, X12, or
BSI dictionaries) </item><item>Business Object Repositories (see below) </item>
<item>Trading Partner Pages (see below).</item></unlist></list>
</p></subsection1><subsection1><title><html:a name="DataBots">XML/EDI Data
Manipulation Agents (DataBots)</html:a></title>
<p> The central goals behind the development of the concept of DataBots are:
<list><unlist> <item>to automate EDI exchanges using familiar
&apos;code-free&apos; open spreadsheet and SQL syntaxes, integrated with
&apos;smart&apos; rule-based tools, to making EDI universally accessible 
</item><item>to provide a &apos;next generation&apos; for EDI that is fully
backward compatible with the existing X12 and UN/EDIFACT standards, but
provides key new business functions </item><item>providing ability to
seamlessly translate between X12 and UN/EDIFACT standards. 
</item></unlist></list></p> <p> All these goals are realizable using XML/EDI-R.
</p><p>
<fig><html:img src="graphics/flow.gif"/></fig>
</p><p> DataBots and their associated XSL scripts provide facilities that allow
XML/EDI systems to: <list><unlist> <item>automatically analyze and manipulate
the data structures embodied in the EDI or XML messages. The rule set used to
accomplish this is defined externally, while the method itself has embedded
knowledge of EDI/XML messaging that allows it to process messages even with
partial or incomplete structural information. </item><item>allow system
developers to express complex EDI interactions through an interface to a rule
template that is clear and simple to follow. This allows users to focus on the
business rules and interactions, without having to use programming language
level tools for EDI. </item><item>exchange rule templates as a way to integrate
their data interactions, and to access and, where appropriate, update each
others databases </item><item>extract and update data to and from heterogeneous
data structures. Message creators and receivers merely have to tell the system
where the data is, or where they want it to be placed, and the system will
access the data directly. </item><item>provide a data interfacce for existing
desktop database systems </item><item>use traditional EDI Implementation
guideline rules, expressed as rule templates that can be distributed
electronically </item><item>provide in-memory, single pass, message translation
that frees message creators and receivers from constraints of database and
message structure conditions traditionally imposed by EDI systems </item>
<item>allow applications to exchange data integration rules and database
structures between systems on an ad hoc and rapid basis. </item><item>provide a
template mapping system which allows details of the data manipulation required
for translation to be expressed by a lay person, without requiring that they
define the entire message structure in every detail </item><item>provide the
means for the message creator to communicate process related information
independent of the receiver&apos;s processing system and data formats </item>
<item>provide formal descriptions for the complete range of commercial
transactions, modelling of transactions and their computational complexity,
decomposition of transactions in actions to be performed locally; and mapping
of local actions on to efficient protocol exchanges. </item><item>detect that
the client requires either a later version of the XSL template, or the Java
components, and send these to the client as an HTTP Distribution and
Replication Protocol (DRP) update message. </item><item>exchange data, update
data and translate data as required as it processes the XML and thereby
receives the templates and associated data. It will of course be able to
reverse the process, and take outbound data, translate it, and generate the
outbound XML as well.</item></unlist></list></p> <p> It should also be noted
that the template method that XML/EDI DataBots implement is extremely compact
and concise. This means that it is a low-bandwidth, efficient protocol, which
is required to meet high volume constraints in batch EDI delivery systems. </p>
<p> Some additional considerations also need to be taken into account include
Process Control and Object Oriented support. Process Control can be easily
accommodated using through the trend towards the use of the Integrated Computer
Aided Manufacturing (ICAM) Definition Language (IDEF) process modelling
language or Documented Petri Nets. Developers can either assign XML tokens to
IDEF entities, and then process control lines added to the template format, or
IDEF can be defined as a notation that can be processed by an XML/EDI-aware
browser. Object oriented support can be provided through W3C&apos;s Document
Object Model (DOM), which provides a CORBA IDL definition for XML objects.</p>
<p>
<emphasis>Editor&apos;s Note: To do - explain how Documented Petri Nets could
be used.</emphasis></p> <p> In summary, the optional DataBots component
provides the agent that brokers, controls, corrects, directs and ensures that
the XML/EDI-R method can progress information transfers correctly.</p>
</subsection1><subsection1><title><html:a name="Objects">XML/EDI Business
Objects</html:a></title>
<p> XML/EDI business objects will be available off-the shelf, created by
developers, with rule sequences devised by users. The usage of these objects
can be defined by their sphere of influence. Business objects can be:
<list><unlist> <item><emphasis>common to a set of XML/EDI applications
</emphasis></item><item><emphasis>common and shared within an industry
</emphasis></item><item><emphasis>shared between trading partners </emphasis>
</item><item><emphasis>corporate infrastructure interface; departments, etc.
</emphasis></item><item><emphasis>application specific objects </emphasis>
</item><item><emphasis>transaction specific </emphasis></item>
<item><emphasis>instance specific.</emphasis></item></unlist></list></p> <p>
Business objects, in most but not all cases, will be invoked by the XML/EDI
Data Manipulation Agents. It is anticipated that for efficiency these object
manipulation DataBots will be written in Java, or using similarly dirstributed
programming language tools. End-users will be supplied with tools that
automatically generate the relevant agents from information provided about the
application.</p> <p> Below are just a few examples of the many possible classes
of XML/EDI business objects: <list><unlist> <item><emphasis>objects which allow
rule driven mapping to/from databases </emphasis></item> 
<item><emphasis>processing of applied taxes </emphasis></item> 
<item><emphasis>processing of shipment costs </emphasis></item> 
<item><emphasis>processing of document routing; internal and
external.</emphasis></item></unlist></list></p>
</subsection1><subsection1><title><html:a name="Editor">XML/EDItors</html:a>
</title>
<p> Used for the interactive creation and completion of form-based EDI,
XML/EDItors are predicated to become the front-end for business applications.
XML/EDI editors will reference Lexicon Repositories to prompt users for
appropriate data using XML parse trees to request related fields. 
</p></subsection1> <subsection1><title><html:a name="Stores">XML/EDI extensions
for message stores</html:a></title>
<p> It is anticipated that message stores will require extensions to provide
the types of complex workflow management needed to ensure the correct delivery
and processing of XML/EDI messages. For example, a message store should not be
able to acknowledge receipt of a message until its contents have been parsed by
an XML parser to ensure that the unencrypted data stream still forms a valid
message.</p> <p> In time it is anticipated that message stores will mutate to
use XML natively. This is not because of XML/EDI directly but because message
stores that know how to identify, search for and process objects within
multimedia streams or business messages will be required for a wide range of
application scenarios.</p></subsection1><subsection1><title><html:a
name="Search">Search Agents</html:a></title>
<p> Based on ad-hoc, learned or profiled information, search engines will
recognize XML/EDI specific tagging and be able to reference suitable private
and public message stores, using standard WWW interfacing, to extract data
intelligently. This will allow for the best combination of free-text and
fielded search. Catalogs and buyer agents will be among the first to use
XML/EDI technology in this way.</p></subsection1> <subsection1><title><html:a
name="Trading">Trading Partner Pages</html:a></title>
<p> XML/EDI will use a mix of today&apos;s X.500 technology, security
certificates, &quot;yellow pages&quot;, email look-up, and verified
characteristics of entities. This is a critical component of performing
business, much more so when employing electronic means. Subsystems will
undoubtedly develop along these lines: they will have to support XML/EDI
interfacing of basic CRUD functions (Create, Revise, Update, Delete) as a
minimum. XML/EDI Data Manipulation Agents shall be able to draw upon these
resources to validate transactions.</p>
</subsection1></subsection></section><section><title><html:a
name="Implementation">6. The Implementation Process</html:a></title><p>
<?xm-replace_text {p}?>
</p><subsection><title><html:a name="Using">Using XML for Electronic Data
Interchange</html:a></title>
<p> The following stages are involved in using XML for the interchange of
commercial EDI messages: <list><unlist> <item><emphasis>identification of
suitable data sets for electronic business transactions </emphasis></item>
<item><emphasis>development of XML document type definitions (DTDs) that
formally define the relationships of the fields that are to form a particular
class of EDI messages </emphasis></item><item><emphasis>the definition of
application-specific extensions to standard message types </emphasis></item>
<item><emphasis>the creation of instances of specific types of electronic
business message </emphasis></item><item><emphasis>the validation of the
contents of messages </emphasis></item><item><emphasis>the transmission and
receipt of electronic business messages </emphasis></item><item><emphasis>the
processing of electronic business messages using DataBots. </emphasis>
</item></unlist></list></p> <p> An application does not need to use all of the
levels of processing shown in Figure 1 and the above list: it can stop at
whichever level in the hierarchy suits it. For example, an application can
confine itself to checking incoming and outgoing EDI messages using a document
object model that has been formally defined in an XML DTD. 
</p></subsection><subsection><title><html:a name="DataSets">Identifying data
sets</html:a></title>
<p> Identification of data sets for electronic business transactions will often
be the responsibility of industry associations and various standardization
bodies such as UN/EDIFACT and EBES (the European Board for EDI
standardization). </p> <p> Whereas existing EDI definitions are primarily
concerned with the way in which a set of fields forms a message, the concepts
required for XML/EDI are based more on the definition of independent classes of
information that can be combined together with other classes of information to
form interchangeable messages. As such the concepts are more akin to the idea
of a Basic Semantic Repository (BSR) being proposed by ISO, and of the Business
Systems Interconnection (BSI) proposal from University of Melbourne.</p> <p>
There is, however, one basic difference between using XML/EDI for defining data
classes and using the BSR or BSI methodologies. In XML/EDI the order and number
of subclasses of a data class can be altered by message creators without having
to formally register that fact with any centralized organization. For example,
if it was necessary for an application to separate building numbers or names
from information about the street the building is located within, XML/EDI would
allow system developers to define two new subclasses that would be combined to
provide the information needed for an existing EDI address component.</p> <p>
One of the advantages the accrues from XML/EDI&apos;s ability to subclass
fields is that such fields can be developed interactively using information
supplied from more than one location. For example, telephone order processing
systems in today&apos;s world of electronic business transactions often start
by asking users for their postcode. This tells the system which region, town
and street the user is located in, but not which building they are in. To find
this out you need to ask the user for a number or name that uniquely identifies
the building within the street identified by the postcode. Using these two
related pieces of information it is possible to interactively complete a
standardized class of information, an address, that can then be shared by an
order, its delivery note, and the invoice required for settlement. </p> <p>
Once information has been captured once, and used to create an instance of the
relevant class of data, it should not be necessary to recreate the information
each time it is required. All that should be needed is that business processes
that need this information reference the point at which the data was originally
captured, e.g. the address associated with the order for the goods.</p> <p> An
essential precursor to the design process of an XML/EDI application is a study
of how business processes re-utilize stored information. Where suitable
business models already exist, these can be represented in XML form. Where
there are no existing model, or the existing models do not meet the
requirements of the trading partners for some reason, developers should perform
a full analysis of the relevant business processes, and seek to identify
similarities between these processes and those already formally documented for
use by other applications. Knowledge of the source and contents of public
repositories of resusable data segments will help to simplify this process. One
of the goals of XML/EDI, therefore is to encourage the setting up of such
repositories of knowledge.</p> <p> To ensure that users can guarantee the
long-term maintenance of data set components repositories of formal XML
definitions will need to be created, and unique object identifiers will need to
be assigned to each set of components. While initially testing can be done
using system identifiers that resolve to Internet Unique Resource Locators
(URLs), in the longer term a mechanism for identifying shared data sets using
formally registered SGML public identifiers associated with URLs will need to
be developed. A system for resolving public identifiers to obtain copies of the
registered definitions will also be required.</p>
</subsection><subsection><title><html:a name="DTDs">Developing DTDs</html:a>
</title>
<p> Messages that pass between systems will typically conform to a previously
agreed XML document type definition (DTD) that formally describes, in terms
interpretable by both humans and computers, an internationally accepted message
type.</p> <p>
<emphasis>Note: The structure of XML DTDs and document instances is formally
defined in <html:a href="http://www.w3.org/TR/PR-xml-971208">Extensible Markup
Language (XML)</html:a>. A bried introduction to the components of XML can be
found in <html:a href="http://www.sgml.u-net.com/xmitemntro.htm">An
Introduction to the Extensible Markup Language</html:a>. More complete
information on the the structure of SGML DTDs, including those that implement
the Web SGML extensions, can be found in
<html:a href="http://www.sgml.u-net.com/book/home.htm">Web SGML and HTML 4.0
Explained</html:a>, which contains examples of the use of each of the
constructs used in SGML and XML, and explains how these facilities are used
within HTML.</emphasis></p> 

<alert>
<emphasis><strong>Warning:</strong> The following text presumes some knowledge
of SGML and/or XML.</emphasis></alert> 

<p> XML DTDs can be developed by:
<list><unlist> <item><emphasis>international standards bodies wishing to
develop standardized sets of interchangeable data </emphasis></item>
<item><emphasis>industry associations wishing to develop agreed procedures for
interchanging messages between members </emphasis></item><item><emphasis>one of
the members of a multilateral or bilateral agreement to share information
</emphasis></item><item><emphasis>a company wishing to supply information to a
number of suppliers or customers </emphasis></item><item><emphasis>a company
wishing to obtain information in a known format from a number of suppliers or
customers.</emphasis></item></unlist></list></p> <p> Declarations that form a
standardized XML DTD will typically be stored in separate files, which can be
referenced, as an XML external subset, by those wishing to use it through the
Internet Uniform Resource Locator that its originator has assigned to a
publicly available copy of the data. Alternatively, if public access is to be
restricted, the document type definition can be stored as the internal subset
within the document type definition sent with the message.</p> <p> Where the
document type definition is based on classes of information shared by more than
one message, each class of information can be defined in a separate file, known
in XML as an external entity, these files being referenced in a suitable
sequence from within the external or internal subset of the XML DTD.</p>
<p> For example, an XML DTD could have the form: 

<example><html:pre> 
&lt;<null></null>!ENTITY % address SYSTEM &quot;http://www.myco.org/messages/XML/address.xml&quot; &gt;
&lt;<null></null>!ENTITY % items SYSTEM
&quot;http://www.edifact.org/messages/XML/items.xml&quot;&gt; 
&lt;<null></null>!ENTITY %
data &quot;(#PCDATA)&quot;&gt; 
&lt;<null></null>!ELEMENT order (order-no, deliver-to,
invoice-to, item+) &gt; 
&lt;<null></null>!ELEMENT order-no %data; &gt; 
&lt;<null></null>!ELEMENT
deliver-to (address) &gt; 
&lt;<null></null>!ELEMENT invoice-to (address) &gt; 
&lt;<null></null>!--Import
standard address class--&gt; %address; 
&lt;<null></null>!--Import standard item class--&gt;
%items;

</html:pre></example>

</p>
<p> This DTD fragment defines two external and one internal parameter entity,
four locally defined elements and contains two parameter entity references
(<code>%address;</code> and <code>%items;</code>) that call in the contents of
the external entities at appropriate points in the definition. Both of the
parameter entity references are preceded by explanatory comments.</p> <p> Note
that the source of each class of information is identified not in the call to
the class itself (<code>%address;</code>) but within a formal definition of the
data storage entities required to process the class definition references (e.g.
the first two lines of the DTD). This technique allows files to be moved
without having to change the main definition of the DTD.</p> <p> Typically the
entity definitions will be stored outside the DTD, which will contain a
reference to the URL of the point at which the latest details of library file
locations can be found. For example: 

<example><html:pre> 
&lt;<null></null>!ENTITY % library SYSTEM
&quot;http://www.myco.org/messages/XML/library.ent&quot;&gt; %library;

&lt;<null></null>!ELEMENT order (order-no, deliver-to, invoice-to, item+) &gt; 
&lt;<null></null>!ELEMENT
order-no %data; &gt; 
&lt;<null></null>!ELEMENT deliver-to (address) &gt; 
&lt;<null></null>!ELEMENT
invoice-to (address) &gt; 
&lt;<null></null>!--Import standard address class--&gt; %address;

&lt;<null></null>!--Import standard item class--&gt; %items;</html:pre></example>

</p>
<p> where <code>%library;</code> references a file containing the entity
definitions given at the start of the previous example.</p> <p> XML provides
(experimental) facilities for ensuring that data modules taken from libraries
do not introduce name clashes in their elements. The names of elements within
each module can be qualified by a module (namespace) identifier. Each namespace
identifier can be associated with a URL that uniquely identifies where the
module is formally defined. For example, the contents of the library file
referenced above could be defined as: 

<example><html:pre> 
&lt;<null></null>?xml-namespace
href=&quot;http://www.ebes.org/XML/EDI-address.xml&quot;
as=&quot;address&quot;?&gt; 
&lt;<null></null>?xml-namespace
href=&quot;http://www.ean-fora.org/XML/order-items.xml&quot;
as=&quot;items&quot;?&gt; 
&lt;<null></null>!ENTITY % data &quot;(#PCDATA)&quot;&gt;

&lt;<null></null>!ENTITY % address &quot; 
&lt;<null></null>!ELEMENT address (address:company,
address:street, address:town, address:region, address:postcode) &gt;

&lt;<null></null>!ATTLIST address id ID #IMPliED &gt; 
&lt;<null></null>!ELEMENT address:company %data;
&gt; 
&lt;<null></null>!ELEMENT address:street %data; &gt; 
&lt;<null></null>!ELEMENT address:town %data;
&gt; 
&lt;<null></null>!ELEMENT address:region %data; &gt; 
&lt;<null></null>!ELEMENT address:postcode
%data; &gt; 
&lt;<null></null>!ELEMENT same-as emPTY&gt; 
&lt;<null></null>!ATTLIST same-as idref IDREF
#REQUIRED &gt; &quot;&gt; 
&lt;<null></null>!ENTITY % items &quot; 
&lt;<null></null>!ELEMENT item
(item:identifier, item:name, item:quantity)&gt; 
&lt;<null></null>!ELEMENT item:identifier
%data; &gt; 
&lt;<null></null>!ELEMENT item:name %data; &gt; 
&lt;<null></null>!ELEMENT item:quantity
%data; &gt; &quot;&gt;</html:pre></example>

</p>
</subsection><subsection><title><html:a name="Extensions">Application-specific
extensions</html:a></title>
<p> XML permits entities and attributes that are defined in the external subset
to be redefined in the internal subset. This facility allows XML/EDI users to
develop locally significant subclasses. It can also be used to create subsets
of messages by removing unused fields from the data model.</p> <p> For example,
the internal subset of a DTD based on the above standardized DTD could contain
the following local redefinition for the <code>%items;</code> parameter entity:


<example><html:pre> 
&lt;<null></null>!ENTITY % items &quot; 
&lt;<null></null>!ELEMENT item (item:identifier,
item:name, item:quantity)&gt; 
&lt;<null></null>!ELEMENT item:identifier (item:database-key?,
item:EAN) &gt; 
&lt;<null></null>!ELEMENT item:database-key %data; &gt; 
&lt;<null></null>!ELEMENT item:EAN
%data; &gt; 
&lt;<null></null>!ELEMENT item:name %data; &gt; 
&lt;<null></null>!ELEMENT item:quantity
%data; &gt; &quot;&gt;</html:pre></example>

</p>
<p> In this case the optional <code>item:database-key</code> field could
contain a direct pointer to the database entry from which the EAN and
associated product name were obtained. This key could be used by a DataBot to
process the item information without having to generate a query based on the
EAN normally provided by the <code>identifier</code> field as the basis for a
slower-to-process database query.</p>
</subsection><subsection><title><html:a name="Instances">Creating message
instances</html:a></title>
<p> An XML/EDI electronic business message consists of a pointer to the
document type definition, any definitions required in the internal subset of
the DTD, and entries for each of the fields required for the message. For
example, the following document type declaration could be used to extend the
external DTD shown in the first of the examples shown above, which is
identified by its Internet Unique Resource Locator: 

<example><html:pre> 
&lt;<null></null>!DOCTYPE
order SYSTEM &quot;http://www.myco.org/messages/XML/message1.xml&quot; [

&lt;<null></null>!ENTITY % items &quot; 
&lt;<null></null>!ELEMENT item (item:identifier, item:name,
item:quantity)&gt; 
&lt;<null></null>!ELEMENT item:identifier (item:database-key?, item:EAN)
&gt; 
&lt;<null></null>!ELEMENT item:database-key %data; &gt; 
&lt;<null></null>!ELEMENT item:EAN %data;
&gt; 
&lt;<null></null>!ELEMENT item:name %data; &gt; 
&lt;<null></null>!ELEMENT item:quantity %data; &gt;
&quot;&gt; ]&gt; 
&lt;<null></null>order&gt; 
&lt;<null></null>order-no&gt;123456 
&lt;<null></null>/order-no&gt;

&lt;<null></null>deliver-to&gt; 
&lt;<null></null>address id=&quot;SGML154&quot;&gt;

&lt;<null></null>address:company&gt;The SGML Centre 
&lt;<null></null>/address:company&gt;

&lt;<null></null>address:street&gt;29 Oldbury Orchard 
&lt;<null></null>/address:street&gt;

&lt;<null></null>address:town&gt;Churchdown 
&lt;<null></null>/address:town&gt;

&lt;<null></null>address:region&gt;Glos. 
&lt;<null></null>/address:region&gt; 
&lt;<null></null>address:postcode&gt;GL3
2PU 
&lt;<null></null>/address:postcode&gt; 
&lt;<null></null>/address&gt; 
&lt;<null></null>/deliver-to&gt;

&lt;<null></null>invoice-to&gt; 
&lt;<null></null>same-as idref=&quot;SMGL154&quot;/&gt;

&lt;<null></null>/invoice-to&gt; 
&lt;<null></null>item&gt; 
&lt;<null></null>item:identifier&gt;

&lt;<null></null>item:database-key&gt;key151235 
&lt;<null></null>/item:database-key&gt;

&lt;<null></null>item:EAN&gt;15356378797 
&lt;<null></null>/item:EAN&gt; 
&lt;<null></null>/item:identifier&gt;

&lt;<null></null>item:name&gt;Special Offer 16 
&lt;<null></null>/item:name&gt; 
&lt;<null></null>item:quantity&gt;12

&lt;<null></null>/item:quantity&gt; 
&lt;<null></null>/item&gt; 
&lt;<null></null>/order&gt; </html:pre></example>

</p>
<p> Note that, because of the prioritization SGML gives to local definitions,
the definition for the <code>%items;</code> parameter entity provided in the
local subset will replace the reference to the external source for the same
entity provided as part of the file referenced using the external subset.</p>
</subsection><subsection><title><html:a name="Vaitemdating">Validating
messages</html:a>
</title>
<p> XML/EDI messages can be validated by a validating XML document instance
processor (known as an XML parser) to ensure they contain all required elements
from the specified data set, and that the fields are in the required sequence.
When the document is found to be valid the parser can generate a document tree
that conforms to the rules laid down in the Document Object Model (DOM)
specification that provides a standardized API between XML parsers and browsers
and other forms of program.</p> <p> XML elements can be assigned attributes
that point to processors that can undertake relevant data validity checks. This
can be done either by associating notation processors with an element, or by
associating an ECMAScript specification with the element as part of an XSL
&quot;action&quot; associated with the specific element types used in specific
contexts, or with particular attribute values.</p> <p> Where the XML Style
Language (XSL) is not being used (e.g. because the browser does not yet support
it) the basic XML language allows user-defined notation processors to be used
to validate the contents of specific XML elements. This is done by adding
definitions of the following form to the external or internal subset of the
DTD: 

<example><html:pre> 
&lt;<null></null>!NOTATION EAN-vailidator SYSTEM
&quot;http://www.myco.org/messages/validate/EAN.cgi&quot;&gt; ... 
&lt;<null></null>!ATTLIST
EAN check NOTATION (EAN-validator) #FIXED &quot;EAN-validator&quot;&gt; 
</html:pre></example>

</p>
<p> The predefined <code>check</code> attribute of the <code>EAN</code> element
will cause the contents of the element to be passed to the program identified
by the declaration for the notation assigned the local name
<code>EAN-validator</code> which is stored at the location indicated by the URL
given in the notation declaration. This processor would typically pass back a
message indicating whether or not the EAN is valid within the context of the
relevant message.</p> <p> XSL provides an alternative, and more generally
applicable method that allows ECMAScript to be used to validate the contents of
XML elements. Details of this method are given below under the heading
&quot;Processing messages&quot;.</p> <p>
<emphasis>Note: In December 1997 an extension to SGML allowed typed data
attributes to be used in standard SGML files. As soon as this new functionality
is absorbed into XML it will be possible to greatly simplify the validation of
message contents.</emphasis></p>
</subsection><subsection><title><html:a name="Exchanging">Exchanging
messages</html:a>
</title>
<p> Data captured in XML/EDI messages can be exchanged: <list><unlist> 
<item><emphasis>in the form of an XML file (which can be encoded in any way
required, but would normally be transmitted using the UTF-8 encoding of the
UCS-2 data set by default) interchanged using the HTTP protocol, or one of its
derivatives (e.g. Secure HTTP) </emphasis></item><item><emphasis>in the form of
a multipart Internet e-mail message (MIME or Secure MIME encoded) </emphasis>
</item><item><emphasis>in the form of a zipped (or otherwise encoded) file
transferred using the Internet File Transfer Protocol (FTP) </emphasis></item>
<item><emphasis>as a compressed (but not otherwise encrypted) set of extensions
to an HTTP POST message that conforms to Internet&apos;s Common Gateway
Interface (CGI) specification </emphasis></item><item><emphasis>in the form of
an EDI message (created by processing the XML file at source using a special
conversion program).</emphasis></item></unlist></list></p> <p> Where conversion
into a known EDIFACT format is required the DTD can be extended to provide
additional attributes that can guide the transformation process. For example,
the following additional properties could be added to the list of attributes
assigned to the <code>EAN</code> element: 

<example><html:pre> 
&lt;<null></null>!ATTLIST EAN check
NOTATION (EAN-validator) #FIXED &quot;EAN-validator&quot; EDI-prefix CDATA
#FIXED &quot;liN+1++&quot; EDI-suffix CDATA #FIXED &quot;:EN&apos;&quot; &gt; 
</html:pre></example>

</p>
<p> Messages exchanged as XML/EDI files can be re-validated on receipt by
running them through an XML/EDI validating parser. Where messages have been
converted into non-XML files prior to transmission the conversion should be
reversed to allow re-validation of the received message.</p> <p> During
re-validation any linked parts of messages should be retrieved to ensure that
the full contents of the message have been checked. When re-validation has been
confirmed the Document Object Model created as part of the validation process
can be used to create an auditable copy of the received message in a message
store/database.</p> </subsection><subsection><title><html:a
name="Processing">Processing messages</html:a></title>
<p> The way in which a received message would be processed would depend on
which of the available methods for exchanging messages was chosen. If the
message was received in a format that provided the XML/EDI message generated by
the originator, the XML Style Language (XSL) can be used to associate different
processes with individual element classes so that elements can be processed by
one or more local processors.</p> <p> XML/EDI message instances are
specifically designed to make the selection of data fields and classes at the
receiver as easy as possible. Each field starts with a &quot;start-tag&quot;
that clearly identifies the class (element type in SGML/XML parlance) of the
following data or embedded subelement set, and specifies any non-default
properties to be associated with the data. The end of each data element is
clearly identified by an &quot;end-tag&quot;, which consists of the name of the
element (class) preceded by a slash between a matched pair of outward pointing
angle brackets. Fields that contain no data, and no embedded subelements, (e.g.
fields that are only present to point to other data sources) have the slash
indicating their end point immediately before the last angle bracket of the
start-tag rather than immediately after the first one of the end-tag. (See the
example for the <code> 
&lt;<null></null>same-as/&gt;</code> element above.) Classes that
contain subclasses of information have embedded elements between their
start-tag and end-tag.</p> <p> XSL allows sets of
<definition>actions</definition> to be associated with particular XML elements.
Actions can be defined in terms of values to be assigned to a set of data
presentation attributes (<definition>styles</definition>), or in terms of a
data processing <definition>script</definition> that users can define using a
<definition>define-script</definition> object . XSL scripts are defined using
the ECMAScript language used for exchanging Java programming modules.</p> <p>
Which actions are associated with which elements can be defined using XML
element sets known as XSL <definition>rules</definition>. A simplified set of
<definition>style-rules</definition> allow presentation properties to be
<definition>applied</definition> to element classes. Rules can be associated
with elements that have been assigned a unique identifier (<code>id</code>)
attribute or that have been assigned a particular value for a
<code>class</code> attribute.</p> <p> Sets of rules and actions can be defined
in <definition>macros</definition>. Macros can be associated with style
processing attributes associated with specific instances of an element. The
default set of style properties defined in XSL can be extended using
<definition>define-style</definition> objects</p>
<p> The component parts of an XML Style Sheet can be: <list><unlist> 
<item><emphasis>defined in separate file(s) referenced using Internet URLs
</emphasis></item><item><emphasis>associated with the definition of elements in
the DTD </emphasis></item><item><emphasis>appended as a header to the document
instance, or </emphasis></item><item><emphasis>associated with a specific
instance of an element.</emphasis></item></unlist></list></p> <p> A typical
XML/EDI XSL description will contain: <list><unlist> <item><emphasis>a <code>

&lt;<null></null>define-script&gt;</code> element that contains ECMAScript definitions of
the variables and functions required to process the document (in addition to
the default function set provided by XSL) </emphasis></item><item><emphasis>a
set of <code> 
&lt;<null></null>define-macro&gt;</code> elements that provide named sets of
predefined actions </emphasis></item><item><emphasis>a set of <code>

&lt;<null></null>define-style&gt;</code> elements that define properties that are to be used
to control style processing </emphasis></item><item><emphasis>a set of <code>

&lt;<null></null>rule&gt;</code> elements that contain within them: </emphasis>
</item></unlist></list><list><unlist> <item><emphasis>a <code>

&lt;<null></null>target-element&gt;</code> that indicates which type of element the rule is
to apply to, or </emphasis></item><item><emphasis>an <code> 
&lt;<null></null>id&gt;</code>
element that identifies the unique identifier of the particular instance of an
element the rule applies to, or </emphasis></item>
<item><emphasis>a <code> 
&lt;<null></null>class&gt;</code> element that identifies which
class of elements the rule is to apply to </emphasis></item><item><emphasis>an
<code> 
&lt;<null></null>element&gt;</code> element that defines ancestors and descendants of
the targeted element that must be present for the rule to apply (ancestors are
dsfined by <code> 
&lt;<null></null>element&gt;</code> elements that surround the targeted
element definition, descendants are defined by <code> 
&lt;<null></null>element&gt;</code>
elements nested within the definition of the target element) </emphasis></item>
<item><emphasis>an <code> 
&lt;<null></null>attribute&gt; </code>element that identifies
which attributes the selected element(s) must have before the rule applies
</emphasis></item><item><emphasis>an <code> 
&lt;<null></null>invoke-macro&gt;</code>
element, which may have embedded within it a set of <code> 
&lt;<null></null>arg&gt;</code>
(argument) control elements, that indicates which macros are to be associated
with the rule </emphasis></item><item><emphasis>a set of actions that must be
processed/evaluated when the rule pattern is matched</emphasis>
</item></unlist></list><list><unlist> <item><emphasis>a set of <code>

&lt;<null></null>style-rule&gt;</code> elements that show which presentation styles should
be associated with particular element types/classes/instances.</emphasis>
</item></unlist></list></p> <p> XSL actions are typically associated with the
way in which objects should be presented to users. This process is typically
controlled through the use of <definition>flow objects</definition>. XSL
provides two default sets of flow objects, one based on the elements typically
found in HTML files, and the other based on the flow objects defined in ISO/IEC
10179 (DSSSL). The set of DSSSL flow objects supported by XSL includes:
<list><unlist> <item><definition>scroll</definition> - used for control of
scrollable screen displays </item>
<item><definition>paragraph</definition> - used to create blocks of text 
</item><item><definition>line-field</definition> - used to control the
presentation of lists </item><item><definition>table</definition>, together
with associated controls for <definition>table-part</definition>,
<definition>table-column</definition>, <definition>table-row</definition>,
<definition>table-cell</definition> and <definition>table-border</definition> -
used to control the presentation of tables </item>
<item><definition>simple-page-sequence</definition> - used for creating
multi-page documents </item><item><definition>sequence</definition> - used for
specifying inherited characteristics </item><item><definition>link</definition>
- used to control the presentation of hypertext links.</item></unlist></list>
</p><p> The <code> 
&lt;<null></null>eval&gt;</code> element can be used to indicate points
at which macros and scripts are to be evaluated as a result of applying a rule.
</p> <p> For an example of the use of XSL specifications based on the use of
HTML flow objects refer to Appendix A.</p></subsection><subsection>
<title><html:a name="Rules">Activating rules</html:a></title>
<p> The XML link process can be used to associate XML/EDI rules with a file.
Normally the Simple link format will be used to identify one or more files
containing the relevant rules. Typically this will result in a processing
instruction of the following form being added to the start of the document
instance: 

<example><html:pre> 
&lt;<null></null>?xml-edi-rules-template
HREF=&quot;http://www.myco.org/XML/EDI/Rules/orders.xml&quot;?&gt;</html:pre></example>


</p></subsection></section><section><title><html:a name="A1">Appendix A1: Using
XML/EDI for Book Ordering</html:a></title> <p>The following statement of the
current role of EDI in Book Ordering was made by the European Board of EDI
Standardization by the UK Book Industry Communication (BIC) manager, Brian
Green in May 1997: <quote><p> &quot;The nature of the book trade has encouraged
its adoption of various forms of Electronic Commerce over the last 20 years.
The introduction of a national UK standard book numbering system in the
1960&apos;s and an international standard (ISBN) in the early 70&apos;s
together with central catalogues of books in print in nearly all countries was
essential for an industry where even the smallest retail outlet offered
customers the facility to order any one of around 600,000 books currently in
print (in the UK) from 20,000 publishers with, currently, one hundred thousand
new titles appearing every year. There was no hub in the traditional sense
since, although WH Smith in the UK has always had a large market share, the
number of book titles stocked is relatively low and they have not, until very
recently, been much concerned with customers special orders. <p> In the late
1970&apos;s, the UK book trade set up Teleordering as a centralized ordering
service using a simple non-standard order format, providing dedicated terminals
on which booksellers simply keyed quantity and ISBN (their location number was
installed on the form as a default). The orders were polled overnight by
Teleordering and automatically routed to the correct publisher either
electronically or, in the case of small publishers, by mail or fax. The
bookseller received a basic confirmation of receipt of the order by
Teleordering with an indication from the Teleordering database whether the book
was recorded as available or out of print. Today TeleOrdering has an annual
throughput of some 27 million orders, runs on PC&apos;s and is owned J Whitaker
&amp; Sons who also publish a &apos;books in print&apos; CD-ROM and provide a
sales data monitoring service. Teleordering has also established itself as an
EDI VAN with a full range of Tradacoms and EDIFACT messages. The two services
run side by side and will convert the non-standard Teleordering format orders
coming from booksellers to EDIFACT or Tradacoms for transmission to publishers.
</p></p> <p> Similar services were set up in other European countries, the US,
Canada etc., although the UK service has always been the largest in the world. 
</p> <p> A second book trade EDI service, called First EDItion was set up in
1992 in the UK. This is a pure EDI service based on INS and is particularly
strong in the library sector. Both First EDItion and Teleordering are being
used for international trade, mainly between UK publishers and European
wholesalers who, e.g. in Netherlands and Germany, operate their own dedicated
electronic ordering services for booksellers in their countries. First Edition
has announced that it will introduce a book trade service based on GE&apos;s
&quot;TradeWeb&quot;, which offers a forms-based Internet service linking to
the GEIS VAN. </p> <p> There has been an interesting &apos;light EDI&apos;
scheme running in the UK for the last four years. Following publication of the
book trade Tradacoms messages by Book Industry Communication, the UK book trade
EDI body, the major UK wholesalers, who had until then been offering dedicated
electronic ordering services, decided to collaborate in a service called
BUYLINE. They provided all their bookseller customers, at a nominal cost with
simple forms based ordering software that links in with either the &apos;book
bank&apos; books in print CD-ROM or a wholesalers own stockist, enabling the
bookseller to select the books required and choose their supplier from a pull
down list. BUYliNE includes communications software that dials up the selected
supplier and transmits the order in Tradacoms format. The software will also
accept Tradacoms acknowledgments and present these to the user in a simple
user-friendly format. The rights in this product have now reverted to the
systems house, Triptych! ! ! , who developed it and they are extending the
service to the major distributors as well as wholesalers. Their software is
also included in a number of the book shop computer systems. It is generally
expected that the BUYliNE system will migrate to EDIFACT and use Internet
rather than direct dial up communications in due course. </p> <p> A further
development is the regular monthly production of multimedia CD-ROM stock
catalogues by major European wholesalers. Most of these allow users to build
order files and output them in EDI formats, normally using direct dial-up. It
is anticipated that data compression and increased bandwidth will soon allow
these facilities to be available over Internet. An important point, however, is
that BIC in the UK and EDItEUR in Europe have managed to produce a consensus on
the book trade implementation of the messages that ensures that all recent
services use standard message formats.&quot;</p></quote></p> <p> BIC feel that
trials of standard forms freely available over the Internet, outputting EDIFACT
messages to any trading partner able to receive them, would be very helpful. 
</p>
<subsection><title><html:a name="BIC">Applying XML/EDI to Book
Ordering</html:a></title>
<p> The form shown in Figure A.1 has been designed for displaying a book order
based on the <html:a href="http://www.editeur.org/">EDItEUR</html:a> Book
Ordering Message as described in the <cite><citename>EDItEUR EDI Implementation
Guidelines for Book Trade Distribution</citename></cite>. </p> <p>
<emphasis>Note: The use of form fields in the following table is gratuitous: it
is intended to indicate that user interaction with XML displays is possible.
The form was produced using beta software for an add-on to Internet Explorer
4.0 (MSXSL) released by Microsoft in January 1998 to demonstrate the power of
their XML Scripting Language (XSL) proposal.</emphasis><fig><title>Figure A.1:
Form for displaying EDItEUR lite-EDI Book Order Messages </title><html:img
alt="EDItEUR itemte EDI Book Order" src="graphics/editeur.gif"/><html:img
alt="User options associated with order" src="graphics/editeur1.gif"/></fig>
</p>
<p> Figure A.2 shows how XML is used to code a form in Figure A.1. 

<example><html:pre>

&lt;<null></null>?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;
standalone=&quot;no&quot;?&gt; 
&lt;<null></null>?xml-stylesheet
href=&quot;edi-lite.xsl&quot; type=&quot;text/xsl&quot;&gt; 
&lt;<null></null>!DOCTYPE
Book-Order SYSTEM &quot;edi-lite.dtd&quot;&gt; 
&lt;<null></null>Book-Order
Supplier=&quot;4012345000951&quot;
Send-to=&quot;mailto:orders@sgml.u-net.com&quot;&gt; 
&lt;<null></null>Title&gt;EDItEUR
lite-EDI Book Ordering 
&lt;<null></null>/Title&gt; 
&lt;<null></null>Order-No&gt;967634 
&lt;<null></null>/Order-No&gt;

&lt;<null></null>Message-Date&gt;19990308 
&lt;<null></null>/Message-Date&gt;

&lt;<null></null>Buyer-EAN&gt;5412345000176 
&lt;<null></null>/Buyer-EAN&gt; 
&lt;<null></null>Order-line
Reference-No=&quot;0528835&quot;&gt; 
&lt;<null></null>ISBN&gt;0201403943 
&lt;<null></null>/ISBN&gt;

&lt;<null></null>Author-Title&gt;Bryan, Martin/SGML and HTML Explained 
&lt;<null></null>/Author-Title&gt;

&lt;<null></null>Quantity&gt;1 
&lt;<null></null>/Quantity&gt; 
&lt;<null></null>/Order-line&gt; 
&lt;<null></null>Order-line
Reference-No=&quot;0528836&quot;&gt; 
&lt;<null></null>ISBN&gt;0856674427 
&lt;<null></null>/ISBN&gt;

&lt;<null></null>Author-Title&gt;light, Richard/Presenting XML 
&lt;<null></null>/Author-Title&gt;

&lt;<null></null>Quantity&gt;1 
&lt;<null></null>/Quantity&gt; 
&lt;<null></null>/Order-line&gt; 
&lt;<null></null>/Book-Order&gt; 
</html:pre></example>

</p><p> Figure A.2: XML encoding of Book Order Message </p> <p> A
typical reaction to comparing this file with the displayed example and its
EDI-based EDItEUR equivaent is &quot;Where has all the EDI information
gone?&quot;, and &quot;Where has all the material under the table come
from?&quot;. The answer is that all immutable information goes into the
document type definition (DTD) referenced in the <code> 
&lt;<null></null>!DOCTYPE</code>
statement that starts the coding, or in the associated style sheet.</p> <p>
<emphasis>Note: The beta release of MSXSL does not support the
<code>xml-stylesheet</code> processing instruction, and requires the use of
another technique to associate the stylesheet with the document
instance.</emphasis></p> <p> Figure A.3 shows the contents of the DTD used for
this example. The single line reference to this DTD is sufficient to provide
the browser with all the additional information it needs to process the
message. </p> <p> Note how the definition of each element defined in Figure A.3
contains attributes whose fixed values contain the prefixes and suffixes of
each of the EDIFACT fields that may need to be generated in response to the
messages. </p> <p> The message format generated from the completed form could
be a pure EDIFACT message of the type shown on Page II-2-2 of the
<cite><citename>EDItEUR EDI Implementation Guidelines for Book Trade
Distribution.</citename></cite></p> <p>
<emphasis>Note: The beta release MSXSL add-on to Internet Explorer 4.0 is only
capable of submitting form data in the form of an HTTP&apos;s Common Gateway
Interchange (GCI) message format. Conversion to EDI format would require
additional program modules, which are not shown in this simple
example.</emphasis> 

<example><html:pre> 
&lt;<null></null>!DOCTYPE Book-Order [ 
&lt;<null></null>!--XML-conformant
Document Type Defintion for EDItEUR Book Order Message. Version 1.1 - Created
January 1998 by M. Bryan from The SGML Centre This DTD should be referenced
using the following public identifier: PUBliC &quot;-//EDItEUR//DTD Book Order
Message//EN&quot; --&gt; 
&lt;<null></null>!--Entities referenced within DTD--&gt;

&lt;<null></null>!--Entities used to datatype attribute values--&gt; 
&lt;<null></null>!--Uniform Resource
Locator identifier. Contents of attribute must provide a valid HTTP or MAILTO
address conforming to IETF RFC 822--&gt; 
&lt;<null></null>!ENTITY % URL &quot;CDATA&quot;
&gt; 
&lt;<null></null>!--EAN location code. Number that uniquely identifies
suppliers/purchasers. --&gt; 
&lt;<null></null>!ENTITY % EAN &quot;NUMBER&quot;&gt;

&lt;<null></null>!--Formal EDIFACT definition of datatype. May be used by EDI-compliant
browsers to validate the data entered by users prior to acceptance when a user
attempts to move to another field. --&gt; 
&lt;<null></null>!ENTITY % EDItype
&quot;NAME&quot; &gt; 
&lt;<null></null>!--Message Content element declarations--&gt;

&lt;<null></null>!--Book Order element: Purpose: Container for message fields and support
information. Attributes: EDI-Prefix formally identifies type of message.
EDI-Suffix contains strings to be output at end of message. Send-to identifies
Uniform Reference Locator (URL) for site to which EDIFACT message is to be sent
for processing. Supplier contains unique EAN that identifies supplier. --&gt;

&lt;<null></null>!ELEMENT Book-Order (Title?, Order-No, Message-Date, Buyer-EAN,
Order-line+) &gt; 
&lt;<null></null>!ATTLIST Book-Order EDI-Prefix CDATA #FIXED
&quot;UNH+ME00579+ORDERS:D:93A:UN:EAN007&quot; EDI-Suffix CDATA #FIXED
&quot;UNS+S&apos;CNT+2:2&apos;UNT+18+ME00579&quot; Send-to %URL; #REQUIRED
Supplier %EAN; #REQUIRED &gt; 
&lt;<null></null>!--Title element: Purpose: Used to provide
supplier dependent title for form: Title can be displayed in window header or
at top of form, or in both locations --&gt; 
&lt;<null></null>!ELEMENT Title (#PCDATA) &gt;

&lt;<null></null>!--Order Number element: Purpose: Allows users to assign unique number to
their order. Attributes: EDI-Prefix formally identifies type of message.
Datatype identifies format that contents must conform to. Size indicates width
of box to be used to capture input. Title indicates text to precede box. --&gt;

&lt;<null></null>!ELEMENT Order-No (#PCDATA) &gt; 
&lt;<null></null>!ATTLIST Order-No EDI-Prefix CDATA
#FIXED &quot;BGM+220+&quot; Datatype %EDItype; #FIXED &quot;C8&quot; Size
NUMBER #FIXED &quot;8&quot; Title CDATA &quot;Book Order No:&quot; &gt;

&lt;<null></null>!--Message Date element: Purpose: To indicate date order was placed. Date
must be entered in ISO 8601 format without separators, e.g. CCYYMMDD
Attributes: EDI-Prefix formally identifies type of message. EDI-Suffix
identifies data to immediately follow contents. Datatype identifies format that
contents must conform to. Size indicates width of box to be used to capture
input. Title indicates text to precede input field. Comment contains
explanatory text to follow the input field. --&gt; 
&lt;<null></null>!ELEMENT Message-Date
(#PCDATA) &gt; 
&lt;<null></null>!ATTLIST Message-Date EDI-Prefix CDATA #FIXED
&quot;DTM+137+&quot; EDI-Suffix CDATA #FIXED &quot;:102&quot; Datatype
%EDItype; #FIXED &quot;Date&quot; Size NUMBER #FIXED &quot;12&quot; Title CDATA
&quot;Message Date:&quot; Comment CDATA &quot;Enter dates in CCYYMMDD
format&quot; &gt; 
&lt;<null></null>!--Buyer EAN identifier element: Purpose: To identify the
unique EAN assigned to the purchaser. Attributes: EDI-Prefix formally
identifies type of message. EDI-Suffix identifies data to immediately follow
contents. Datatype identifies format that contents must conform to. Size
indicates width of box to be used to capture input. Title indicates text to
precede box. --&gt; 
&lt;<null></null>!ELEMENT Buyer-EAN (#PCDATA) &gt; 
&lt;<null></null>!ATTLIST
Buyer-EAN EDI-Prefix CDATA #FIXED &quot;NAD+BY+&quot; EDI-Suffix CDATA #FIXED
&quot;::9&quot; Datatype %EDItype; #FIXED &quot;C13&quot; Size NUMBER #FIXED
&quot;13&quot; Title CDATA &quot;Buyer EAN:&quot; &gt; 
&lt;<null></null>!--Order line
element: Purpose: Container for objects used to order book. Attributes:
EDI-Prefix formally identifies type of message. line-no is calculated by system
to be 1 + number of preceding order lines within file. Ref-Prefix identifies
EDI prefix for reference number Reference-no uniquely identifies each line.
Number is supplied by supplier&apos;s system with input file. --&gt;

&lt;<null></null>!ELEMENT Order-line (ISBN, Author-Title, Quantity) &gt; 
&lt;<null></null>!ATTLIST
Order-line EDI-Prefix CDATA #FIXED &quot;liN+&quot; line-no NUMBER #IMPliED
Ref-Prefix CDATA #FIXED &quot;#RFF+item:&quot; Reference-No NUMBER #REQUIRED
&gt; 
&lt;<null></null>!--ISBN element: Purpose: To enter unique ISBN of book to be ordered
Attributes: EDI-Prefix formally identifies type of message. EDI-Suffix
identifies data to immediately follow contents. Datatype identifies format that
contents must conform to. Size indicates width of box to be used to capture
input. Title indicates text to precede box. --&gt; 
&lt;<null></null>!ELEMENT ISBN (#PCDATA)
&gt; 
&lt;<null></null>!ATTLIST ISBN EDI-Prefix CDATA #FIXED &quot;PIA+5+&quot; EDI-Suffix
CDATA #FIXED &quot;:IB&quot; Datatype %EDItype; #FIXED &quot;N12&quot; Size
NUMBER #FIXED &quot;12&quot; Title CDATA &quot;ISBN:&quot; &gt; 
&lt;<null></null>!--Author
and Title element: Purpose: Optional statement of author and title details to
confirm correct ISBN has been entered. Attributes: EDI-Prefix formally
identifies type of message. Datatype identifies format that contents must
conform to. Size indicates width of box to be used to capture input. Title
indicates text to precede box. --&gt; 
&lt;<null></null>!ELEMENT Author-Title (#PCDATA) &gt;

&lt;<null></null>!ATTLIST Author-Title EDI-Prefix CDATA #FIXED &quot;IMD+F+BST+:::&quot;
Datatype %EDItype; #FIXED &quot;C60&quot; Size NUMBER #FIXED &quot;40&quot;
Title CDATA &quot;Author/Title:&quot; &gt; 
&lt;<null></null>!--Quantity element: Purpose: To
identify the number of copies required. Attributes: EDI-Prefix formally
identifies type of message. Datatype identifies format that contents must
conform to. Size indicates width of box to be used to capture input. Title
indicates text to precede box. --&gt; 
&lt;<null></null>!ELEMENT Quantity (#PCDATA) &gt;

&lt;<null></null>!ATTLIST Quantity EDI-Prefix CDATA #FIXED &quot;PQTY+21:&quot; Datatype
%EDItype; #FIXED &quot;N2&quot; Size NUMBER #FIXED &quot;2&quot; Title CDATA
&quot;Quantity:&quot; &gt; 
&lt;<null></null>!--Declarations for message control support
elements--&gt; 
&lt;<null></null>!--Electronic Address element: Purpose: To capture
electronic address to which messages from the supplier to the buyer can be
sent. --&gt; 
&lt;<null></null>!ENTITY % ISOlat1 SYSTEM &quot;A:\ISOlat1.ent&quot; &gt;

&lt;<null></null>!ENTITY % ISOnum SYSTEM &quot;a:\ISOnum.ent&quot; &gt; %ISOlat1; %ISOnum;
]&gt;

</html:pre></example>

</p>
<p> Figure A.3: XML Document Type Definition for lite-EDI Book Order </p> <p>
The XSL style sheet used to create the displayed version of the form shown in
Figure A.1 took the form shown in Figure A.4: 

<example><html:pre> 
&lt;<null></null>xsl&gt;

&lt;<null></null>define-script&gt; 
&lt;<null></null>![CDATA[ function ISO8601DateCheck(date) {
year=date.substring(0,4); /* Microsoft have a bug in substring that means that
end is not 0-based, but start is! */ month=date.substring(4,6); month--; /*
Microsoft have a bug in their toUTCString convertor of month names! */
day=date.substring(6,8); MessageDate=new Date(year, month, day);
return(MessageDate.toUTCString().substring(0,16)); /* Microsoft do not support
toGMTString, and to LocaleString does not pick up the default date format set
for Windows 95 regional settings. */ } ]]&gt; 
&lt;<null></null>/define-script&gt;

&lt;<null></null>rule&gt; 
&lt;<null></null>root/&gt; 
&lt;<null></null>HTML&gt; 
&lt;<null></null>TITLE&gt;EDItEUR Book Order

&lt;<null></null>/TITLE&gt; 
&lt;<null></null>BODY&gt; 
&lt;<null></null>FORM METHOD=&quot;POST&quot;
ACTION=&quot;=getAttribute(&apos;Send-to&apos;)&quot;&gt; 
&lt;<null></null>section
ALIGN=&quot;CENTER&quot;&gt; 
&lt;<null></null>select-elements&gt; 
&lt;<null></null>target-element
type=&quot;Title&quot;/&gt; 
&lt;<null></null>/select-elements&gt; 
&lt;<null></null>/section&gt; 
&lt;<null></null>TABLE
BORDER=&quot;&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;
bordercolor=&quot;#FF0000&quot;&gt; 
&lt;<null></null>TBODY&gt; 
&lt;<null></null>select-elements&gt;

&lt;<null></null>target-element type=&quot;Order-No&quot;/&gt; 
&lt;<null></null>/select-elements&gt;

&lt;<null></null>select-elements&gt; 
&lt;<null></null>target-element type=&quot;Message-Date&quot;/&gt;

&lt;<null></null>/select-elements&gt; 
&lt;<null></null>select-elements&gt; 
&lt;<null></null>target-element
type=&quot;Buyer-EAN&quot;/&gt; 
&lt;<null></null>/select-elements&gt;

&lt;<null></null>select-elements&gt; 
&lt;<null></null>target-element type=&quot;Order-line&quot;/&gt;

&lt;<null></null>/select-elements&gt; 
&lt;<null></null>/TBODY&gt; 
&lt;<null></null>/TABLE&gt; 
&lt;<null></null>DIV
style=&quot;font: 10pt Arial&quot;&gt; 
&lt;<null></null>BR/&gt; 
&lt;<null></null>input
type=&quot;checkbox&quot; name=&quot;partial&quot;
value=&quot;allowed&quot;/&gt; &amp;nbsp;Tick here if a delayed/partial supply
of order is acceptable 
&lt;<null></null>BR/&gt; 
&lt;<null></null>input type=&quot;checkbox&quot;
name=&quot;confirmation&quot; value=&quot;requested&quot;/&gt; &amp;nbsp;Tick
here if Confirmation of Acceptance of Order is to be returned by e-mail

&lt;<null></null>BR/&gt; 
&lt;<null></null>input type=&quot;checkbox&quot; name=&quot;DeliveryNote&quot;
value=&quot;required&quot;/&gt; &amp;nbsp;Tick here if e-mail Delivery Note is
required to confirm details of delivery 
&lt;<null></null>BR/&gt; 
&lt;<null></null>BR/&gt; E-mail address:

&lt;<null></null>input type=&quot;text&quot; name=&quot;e-address&quot;
size=&quot;30&quot;/&gt; 
&lt;<null></null>BR/&gt; 
&lt;<null></null>BR/&gt; Please respond in: 
&lt;<null></null>select
name=&quot;response-language&quot;&gt; 
&lt;<null></null>option value=&quot;EN&quot;
selected=&quot;selected&quot;&gt;English 
&lt;<null></null>/option&gt; 
&lt;<null></null>option
value=&quot;FR&quot;&gt;Fran&amp;ccedil;ais 
&lt;<null></null>/option&gt; 
&lt;<null></null>option
value=&quot;DE&quot;&gt;Deutsch 
&lt;<null></null>/option&gt; 
&lt;<null></null>option
value=&quot;ES&quot;&gt;Espagnol 
&lt;<null></null>/option&gt; 
&lt;<null></null>option
value=&quot;IT&quot;&gt;Italiano 
&lt;<null></null>/option&gt; 
&lt;<null></null>/select&gt; 
&lt;<null></null>BR/&gt;

&lt;<null></null>BR/&gt; 
&lt;<null></null>input type=&quot;submit&quot; value=&quot;Press here to send
completed form to supplier&quot;/&gt; 
&lt;<null></null>/DIV&gt; 
&lt;<null></null>/FORM&gt; 
&lt;<null></null>/BODY&gt;

&lt;<null></null>/HTML&gt; 
&lt;<null></null>/rule&gt; 
&lt;<null></null>rule&gt; 
&lt;<null></null>target-element
type=&quot;Order-No&quot;/&gt; 
&lt;<null></null>TR&gt; 
&lt;<null></null>TD style=&quot;font: 12pt
Times&quot;&gt;Book Order No: 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt; 
&lt;<null></null>INPUT
NAME=&quot;Order-No&quot; VALUE=&quot;=this.text&quot;/&gt; 
&lt;<null></null>/TD&gt;

&lt;<null></null>TD&gt;Your reference number for order 
&lt;<null></null>/TD&gt; 
&lt;<null></null>/TR&gt; 
&lt;<null></null>/rule&gt;

&lt;<null></null>rule&gt; 
&lt;<null></null>target-element type=&quot;Message-Date&quot;/&gt; 
&lt;<null></null>TR&gt;

&lt;<null></null>TD style=&quot;font: 12pt Times&quot;&gt;Message Date: 
&lt;<null></null>/TD&gt;

&lt;<null></null>TD&gt; 
&lt;<null></null>INPUT NAME=&quot;DATE&quot; VALUE=&quot;=this.text&quot;
SIZE=&quot;8&quot;/&gt; ( 
&lt;<null></null>eval&gt;ISO8601DateCheck(this.text)

&lt;<null></null>/eval&gt;) 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt;Date in CCYYMMDD format 
&lt;<null></null>/TD&gt;

&lt;<null></null>/TR&gt; 
&lt;<null></null>/rule&gt; 
&lt;<null></null>rule&gt; 
&lt;<null></null>target-element
type=&quot;Buyer-EAN&quot;/&gt; 
&lt;<null></null>TR&gt; 
&lt;<null></null>TD style=&quot;font: 12pt
Times&quot;&gt;Buyer EAN: 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt; 
&lt;<null></null>INPUT
NAME=&quot;Buyer&quot; VALUE=&quot;=this.text&quot; SIZE=&quot;13&quot;/&gt;

&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt;Your unique identification number 
&lt;<null></null>/TD&gt; 
&lt;<null></null>/TR&gt;

&lt;<null></null>TR&gt; 
&lt;<null></null>TD style=&quot;font: 12pt Times&quot;&gt;Supplier EAN:

&lt;<null></null>/TD&gt; 
&lt;<null></null>TD style=&quot;font: 10pt Arial&quot;&gt;

&lt;<null></null>eval&gt;ancestor(&quot;Book-Order&quot;,
this).getAttribute(&quot;Supplier&quot;) 
&lt;<null></null>/eval&gt; 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD
ALIGN=&quot;center&quot;&gt; 
&lt;<null></null>strong&gt;Book Supplies Incorporated

&lt;<null></null>/strong&gt; 
&lt;<null></null>/TD&gt; 
&lt;<null></null>/TR&gt; 
&lt;<null></null>/rule&gt; 
&lt;<null></null>rule&gt; 
&lt;<null></null>element
type=&quot;Order-line&quot;&gt; 
&lt;<null></null>target-element type=&quot;ISBN&quot;/&gt;

&lt;<null></null>/element&gt; 
&lt;<null></null>TR&gt; 
&lt;<null></null>TD style=&quot;font: 12pt Times&quot;&gt;ISBN:

&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt; 
&lt;<null></null>INPUT NAME=&quot;=&apos;ISBN-&apos; +
ancestor(&apos;Order-line&apos;,
this).getAttribute(&apos;Reference-No&apos;)&quot; VALUE=&quot;=this.text&quot;
SIZE=&quot;10&quot;/&gt; 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD ALIGN=&quot;CENTER&quot;
rowspan=&quot;3&quot;&gt; Order line reference number: 
&lt;<null></null>BR/&gt; 
&lt;<null></null>SPAN
style=&quot;font: 10pt Arial;&quot;&gt; 
&lt;<null></null>eval&gt;
String(Number(ancestor(&quot;Order-line&quot;,this).getAttribute(&quot;Reference-No&quot;)))

&lt;<null></null>/eval&gt; 
&lt;<null></null>/SPAN&gt; 
&lt;<null></null>/TD&gt; 
&lt;<null></null>/TR&gt; 
&lt;<null></null>/rule&gt; 
&lt;<null></null>rule&gt;

&lt;<null></null>element type=&quot;Order-line&quot;&gt; 
&lt;<null></null>target-element
type=&quot;Author-Title&quot;/&gt; 
&lt;<null></null>/element&gt; 
&lt;<null></null>TR&gt; 
&lt;<null></null>TD
style=&quot;font: 12pt Times&quot;&gt;Author/Title: 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt;

&lt;<null></null>INPUT NAME=&quot;=&apos;Title-&apos; + ancestor(&apos;Order-line&apos;,
this).getAttribute(&apos;Reference-No&apos;)&quot; VALUE=&quot;=this.text&quot;
size=&quot;35&quot;/&gt; 
&lt;<null></null>/TD&gt; 
&lt;<null></null>/TR&gt; 
&lt;<null></null>/rule&gt; 
&lt;<null></null>rule&gt;

&lt;<null></null>element type=&quot;Order-line&quot;&gt; 
&lt;<null></null>target-element
type=&quot;Quantity&quot;/&gt; 
&lt;<null></null>/element&gt; 
&lt;<null></null>TR&gt; 
&lt;<null></null>TD
style=&quot;font: 12pt Times&quot;&gt;Quantity: 
&lt;<null></null>/TD&gt; 
&lt;<null></null>TD&gt;

&lt;<null></null>INPUT NAME=&quot;=&apos;Quantity-&apos; + ancestor(&apos;Order-line&apos;,
this).getAttribute(&apos;Reference-No&apos;)&quot; VALUE=&quot;=this.text&quot;
SIZE=&quot;4&quot;/&gt; 
&lt;<null></null>/TD&gt; 
&lt;<null></null>/TR&gt; 
&lt;<null></null>/rule&gt; 
&lt;<null></null>/xsl&gt; 
</html:pre></example>

</p><p> Figure A.4: XSL Processing Rules for Example lite-EDI Book
Order</p> <p> The style sheet is itself coded in XML, conforming to an
unidentified meta-DTD specified by the XSL protocol. The first element within
this document shows how developers can define functions using the ECMAScript
language embedded within XSL. This example converts ISO 8601 format dates to a
form that is easier for users to check. This is a simple example of the
powerful client-side functionality that can be added to XSL style-sheets.</p> 
<p>
<emphasis>Note: The comments in the initial function indicate some problems
encountered with using the beta release of the MSXSL software.</emphasis></p> 
<p> The remainder of the style sheet consists of a set of <code>

&lt;<null></null>rule&gt;</code> elements that identify a sequence of
<definition>actions</definition> associated with <definition>target
elements</definition>. The actions create HTML <definition>flow
objects</definition> that Internet Explorer 4.0 displays.</p> <p>
<emphasis>Note: It should be noted that these HTML elements have to conform to
the XML syntax. This is most evident in the case of the empty line break
elements, which are entered as <code> 
&lt;<null></null>BR/&gt;</code></emphasis></p> <p>
Other significant features that should be noted from this example include:
<list><numlist> <item><emphasis>The use of the contents of an attribute of the
<code>Book-Order</code> element as the contents of the Supplier EAN row of the
table. </emphasis></item><item><emphasis>The call to the
<code>ISO8601DateCheck</code> function associated with the rules for displaying
the <code>Message-Date</code> element. </emphasis></item><item><emphasis>The
use of an attribute associated with the <code>Order-line</code> element to
assign information to a set of fields in the displayed form.</emphasis>
</item></numlist></list></p> <p> Users of Version 4.0 of Microsoft&apos;s
Internet Exlplorer web browser will find a demonstration of the application of
the above simple examples at <html:a
href="http://www.xmledi.net/edi-test.htm">http://www.xmledi.net/edi-test.htm</html:a>
</p>
</subsection></section><appendix><title><html:a
name="Glossary">Glossary</html:a>
</title><p> DataBots - XML/EDI Data Manipulation Agent (a.k.a. &quot;Bot&quot;
is a software term for a component that acts as an Agent).</p> <p> XML/EDI-R -
the combination of XML message syntax and rule based EDI. 
</p></appendix><appendix><title><html:a
name="Bibitemography">Bibliography</html:a>
</title><p> Bons, R (1997) <cite>Designing Trustworthy Trade Procedures for
EC</cite>. </p> <p> To be developed</p>
</appendix></body><rear><refsection></refsection></rear></report>
