1 / 38

Bill Cafiero 972-231-2180 jcaf@airmail

XML/EDI XML for Dummies. Bill Cafiero 972-231-2180 jcaf@airmail.net. Session Outline. This Session has four sections: 1. Introductory Section - What is our problem with EDI today? 2. Technical Section - The mechanics of XML

nellis
Télécharger la présentation

Bill Cafiero 972-231-2180 jcaf@airmail

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML/EDI XML for Dummies Bill Cafiero 972-231-2180 jcaf@airmail.net

  2. Session Outline This Session has four sections: 1. Introductory Section - What is our problem with EDI today? 2. Technical Section - The mechanics of XML 3. Current Development Section - What work is underway at the present 4. Example Section - Looking at XML for X12 based EDI A good web site for general XML information is www.xmlinfo.com

  3. Section 1 - The Issue You receive the following transmission... 9.95 • What the heck does this mean? • Is it a length? • Is it a weight? • Is it a part number • Is it a price?

  4. Context for Data But if you receive the following... PO1*1*30*EA*9.95**VP*A-430\ • Now it makes more sense. But why does it make more sense? • We see the 9.95 in a context (It is a segment in an X12 purchase order) • We have previously exchanged a set of rules for this context (e.g. the X12 Standard for the PO1 Segment) • The rules tell us the 4th field in a PO1 segment is a price!

  5. The Problem • Then what’s the problem? • Trading Partners need to make prior arrangements • Complex standards are required • Most Applications can’t understand these rules so we need Translator software • It’s really tough for SME’s

  6. XML Suppose I transmit this instead... Price=9.95 • Does this make more sense? • It’s clearly a price, not a weight or length • The label is human readable (SME’s!!!) • We don’t need prior discussion of where the price is in a segment, or even what segments are

  7. XML Highlights • Data that in X12 is defined by its position in a predefined structure is, in XML, given a label (tag) that describes the data in the transmission itself. • We should probably agree on what the tags are • We may or may not need to define how the elements are organized or structured • The data may be transmitted in any communications protocol - it especially lends itself to the Internet • The data may be from application to application or application to browser (human) or browser to browser or even browser to application This is the essence of XML!

  8. Section 2 - The Technical Stuff Let’s look at the details of XML... • With thanks to the following XML “experts”: • Jen-Yao Chung • Director, Technical Office, Institute for Advanced Commerce • IBM • R.T.Crowley • Senior Vice-President • Research Triangle Consultants • Larry Domeracki • Senior Consultant • GE Information Services

  9. XML is a standard open format for communities to develop their own structured mechanisms for marking-up text and data to facilitate the exchange and manipulation of documents among the community members XML and HTML both evolved from SGML XML is NOT HTML on steroids XML focuses on document exchange HTML focuses on document display All markup languages use tags “< >” and “</>” to markup the text and data to provide information about the information XML: designed to transfer structured text and data among systems in multiple organizations XML 1.0 spec is available at www.w3.org XML = eXtensible Markup Language

  10. This is an XML document <?XML version=“1.0”?> <Basket>My Fruit Basket <Oranges count=”5”/> <Apples count=”1”>Macintosh</Apples> </Basket>

  11. Document Type Definitions • Because we can create our own tags and document structures using XML, we need a mechanism for defining what the tags mean and what the valid structure is. • A DTD is where we declare our specific elements tags. • The DTD also is where we declare what attributes each tag has • <!ELEMENT Basket ( Oranges | Apples | #PCDATA )+> • <!ELEMENT Oranges (#PCDATA)> • <!ATTLIST Oranges • count CDATA #REQUIRED> PCDATA = Parsed Character Data

  12. Tags, Elements and Attributes • Tags are labels that tells an application or other agent to do something to whatever is encased in the tags • <Price> is a “start” tag. </Price> is the closing or “end” tag • An Element refers to both the tags plus the content (the stuff between the tags). E.G. • <Price> 9.95 </Price> • Any tag can have an Attribute that takes the form of name/value pairs, <tagname attribute = “value”> • E.G. <BODY> ID = “Section 1” </BODY> • Note: • XML is case sensitive so that tags like <Basket>, <basket>, and <BASKET> are all different

  13. Viewing XML • What about displaying XML douments? • XML itself does not describe how a document is to be displayed for human interpretation (i.e., screen, paper, audio) • XML documents are just plan text files - you use a text editor to create and view them but there’s no formatting • Cannot view formatted XML directly using version 4.x browsers • Need to convert XML document to HMTL (or some other format) • Internet Explorer 5 and Netscape Communicator 5 browsers will handle XML directly.

  14. Style Sheets • What is a Style Sheet? • You can combine a style sheet with an XML document to display the document in a browser • Style Sheets contain the rules that declare how the document’s information, contained within in the tags should appear or be interpreted by the user agent (browser, printer, text-to-speech converter, etc.) • Style Sheets are like “templates and styles” in MS Word • Style sheets can be written in several languages • Cascading Style Sheets (CSS) extensions to HTML • Extensible Styling Language (XSL)

  15. Implementing XML for EDI • Much of today’s XML Software activity focuses on development of XML parsers • Microsoft, IBM, Datachannel, Web Methods, etc., basically give away their parsers • Most parsers are written in C++ and Java - objected-oriented languages • The basic parser reads an XML document, and breaks it up into its elements and stores the information in a tree structure • It can only do this if the XML document is written to comply with the XML 1.0 Specification • If it succeeds, then the document is considered “well-formed” • Some parsers also can read in a DTD, and validate the document against the DTD description. • These are called “validating” parsers

  16. XML Processing XSL Style Sheet HTML (e.g. Browser) XML Parser XSL Processor DTD Other (e.g. Directly into Application) XML Data Source

  17. XML Parse Tree Example Source Document Bookshop.XML

  18. XML Parse Tree Example

  19. XML is a markup language - version 1.0 by the W3C organization Markup Language is a set of rules that defines what the markup is, and how it defines the structure and content of the document A DTD (Document Type Definition) contains the markup rules for a particular set of documents - the tags, the elements and attributes To markup a document, use the rules from the DTD to label the data and text appropriately. Style Sheets contain the rules that declare how the document’s information, contained within in the tags should appear or be interpreted by the user agent (browser, printer, text-to-speech converter, etc.) XML - Basic Concepts Summary

  20. Why use XML for E-Commerce?: XML bridges the gap between traditional EDI and Web-based applications. Most of high-tech industry has espoused XML: Virtually all new software from Microsoft, GEIS, Netscape, IBM, and others are going to be enabled to use XML. XML could make EC/EDI more available to the SME and other non-traditional EDI users. Section 3 - Current Developments • Many approaches are under development: • BizTalk • CommerceNet • OASIS • EDIFACT • X12 • etc.

  21. BizTalk (http://www.biztalk.org) Microsoft has published a defacto “standard” for XML documents as BizTalk Framework v1.0 The Framework lays down guidelines for encoding business documents using XML Documents described in approved schemas, pass validation tests, and published on www.biztalk.org can be called BizTalk Framework documents The documents must use the XML Data Reduced Subset (XDR) BizTalk messages typically contain one document along with additional information used by the application BizTalk

  22. OASIS • OASIS (http://www.oasis-open.org/) • OASIS is the Organization for the Advancement of Structured Information Standards • OASIS is an international non-profit, vendor neutral consortium dedicated to accelerating industry adoption of application and platform independent formats based on public standards such as XML, SGML and CGM • The consortium was founded in 1993 and was originally called SGML Open • The consortium’s work complements that of international standards bodies such as the World Wide Web Consortium, with a focus on making these standards easy to adopt and practical to use in real-world open system applications • OASIS members include Adobe, Boeing, Compaq, Commerce One, Dun & Bradstreet, Fuji Xerox, GCA, IBM, Microsoft, NIST, Novell, Reuters, Sabre, Software AG, STEP, Sun Microsystems, Xerox plus approximately 75 other companies

  23. ASC X12: X12 has proposed a possible methodology for representing EDI semantics in XML syntax. The specific goals and objectives include: Preserve semantic identities regardless of position within the transaction set, appearance in different transaction sets, and version/release of the standard. Any semantic entity will retain a unique XML representation Provide a methodology for construction semantically significant tags Achieve a balance between uniform structures for X12-XML documents and interoperability between implementations Express transaction set structure explicitly with XML structure Enable creation of “well-formed” XML documents Using XML for EDI

  24. UN/EDIFACT (http://www.ebxml.org): There are currently no UN/EDIFACT documents to describe either a syntax or messages using XML UN/CEFACT and OASIS have formed a group called eb-XML to take expert advice and study means for using XML for conducting EDI internationally It can reasonably be expected any syntax and/or messages shall satisfy international needs rather than being merely a recast of the actions of other bodies The matter is progressing through the UN/CEFACT process now and should be resolved soon Close watch is being placed upon the X12 efforts in this area as a potential example of how a syntax might look Using XML for EDI

  25. CommerceOne, Ariba and RosettaNet • Other approaches • CommerceOne Common Business language (CBL) http://www.commerceone.com • Procurement and e-marketplace software • Business description primitives like companies, services and products • Business forms like catalogs, purchase orders and invoices • Standard measurements, date and time, location, classification codes • Ariba cXML procurement http://www.ariba.com • Industry coalition driven • Healthcare, finance, accounting, automotive • RosettaNet http://www.rosettanet.org, OBI

  26. Object Orientated EDI • OO-EDI (“Future Direction of EDI” work in X12) • An Open-EDI approach using Unified Modeling Language (UML) models and object orientated technology • A vision of future EDI characterized by: • Structured/predefined information • No prior agreements • No human intervention • Independence from underlying IT systems • Supports cross sectoral exchanges • Opportunity to lower barriers to electronic data exchange by introducing: • Standard business scenarios • Services to support these standard scenarios • Permit electronic processing of business transactions • Among autonomous organizations • Within and across sectors

  27. OO-EDI Future OO-EDI Implementation Distributed Object Transport (perhaps with XML) In-house Objects In-house Objects OO-EDI Scenarios (UML Models) Common Business Objects

  28. ebXML A Possible “Coming Together” Industry Consortiums Core technology standards. XML, Schema, DOM, XSL, namespaces, linking, XHTML, RDF, XML Query Accelerating the adoption of industry standards. 100+ member companies The XML Industry portal. A vendor neutral XML schema clearinghouse. Info on how to apply XML in industrial and commercial settings MRO Buying on the Internet IT Supply Chain initiative United Nations Centre for the facilitation of Administration, Commerce and Transport CBL eXML XML/EDI

  29. Section 4 - X12 Example Using XML with X12 based EDI

  30. What’s in a name? Tarheel Systems (DUNS 2736541) is making a shipment from one division of the company to another. Therefore, they need to be shown as the “shipper” in the transaction set or message. Defining Tags for XML/EDI

  31. The X12 EDI Version: The N1 Segment N1*SH*Tarheel Systems*1*2736541*07*SH Defining Tags for XML/EDI (Cont.)

  32. The XML Verbose Version: <N1-Name> <EntityIDCode>SH</EntityIDCode> <Name>Tarheel Systems</Name> <IDCodeQual>1</IDCodeQual> <IDCode>2736541</IDCode> <EntityRelationCode>07</EntityRelationCode> <EntityIDCode>SH</EntityIDCode> </N1-Name> Defining Tags for XML/EDI (Cont.)

  33. The XML Compact Version: <XN1> <X0098>SH</X0098> <X0093>Tarheel Systems</X0093> <X0066>1</X0066> <X0067>2736541</X0067> <X0706>07</X0706> <X0098>SH</X0098> </XN1> Defining Tags for XML/EDI (Cont.)

  34. A Sample X12 EDI transaction in XML: A fellow named John Doe from Battle Creek, MI decides to make a purchase using an X12-xml Purchase Order (TS850) He decides to purchase a hammer. The hammer costs $35.73 from the catalog. There is only one line item in the PO. No taxes will be added. No discounts will be taken. This is just a simple purchase order. Using XML for EDI

  35. <?xml version=“1.0”?> <set850> <set850-1-010> <segST01>850</segST01> <segST02>9999</segST02> </set850-1-010> <set850-1-020> <segBEG01>00</segBEG01> <segBEG02>SA</segBEG02> <segBEG03>123456</segBEG03> <segBEG05>19981001<segBEG05> </set850-1-020> <set850-1-310-loop> <set850-1-310> <segN101>ST</segN101> <segN102>John Doe</segN102> </set850-1-310> <set850-1-330> <segN301>281 Apple Street</segN301> </set850-1-330> <set850-1-340> <segN401>Battle Creek</segN401> <segN402>MI</segN402> </set850-1-340> A Sample X12 EDI transaction in XML

  36. </set850-1-310-loop> </set850-2-010-loop> <set850-2-010> <segPO102>1</segPO102> <segPO103>EA</segPO103> <segPO104>35.73</segPO104> <segPO106>GE</segPO106> <segPO107>Hammer</segPO107> </set850-2-010> </set850-2-010-loop> <set850-3-030> <segSE01>7</segSE01> <segSE02>9999</segSE02> </set850-3-030> </set850> A Sample X12 EDI transaction in XML (cont) As you can see, an EDI transaction in XML can be VERY verbose! (but the internet is “free” isn’t it)

  37. The Path Forward in X12: The X12 White Paper was presented at the October 1998 X12 Meeting for review. An X12 Project Proposal was submitted for the creation of an X12 Technical Report as a reference model for representing EDI data elements in XML. The X12 Technical Report is targeted to be out of committee in June of 1999 after which it could be considered as an X12 Standard. What’s Next? But, as we saw this week, it looks like X12 will support ebXML activities

  38. Is XML the Answer for Future EDI? No single EC technology is an answer to everything in and of itself. Each form of EC from XML through traditional EDI to Imaging and Biometric ID Systems has a place in what we do. The answer is NOT here yet. We still have a very long way to go with all our technologies. Conclusion What is a Legacy System? One that works!

More Related