97b9f42cebb07c0eae1cea1740e55be5.ppt
- Количество слайдов: 38
GE Information Services XML/EDI XML for Dummies Bill Cafiero 972 -231 -2180 jcaf@airmail. net Copyright © William G. Cafiero, 2000 Page 1
GE Information Services 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 X 12 based EDI A good web site for general XML information is www. xmlinfo. com Copyright © William G. Cafiero, 2000 Page 2
Section 1 - The Issue GE Information Services 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? Copyright © William G. Cafiero, 2000 Page 3
GE Information Services Context for Data But if you receive the following. . . PO 1*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 X 12 purchase order) • We have previously exchanged a set of rules for this context (e. g. the X 12 Standard for the PO 1 Segment) • The rules tell us the 4 th field in a PO 1 segment is a price! Copyright © William G. Cafiero, 2000 Page 4
GE Information Services 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 Copyright © William G. Cafiero, 2000 Page 5
GE Information Services 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 Copyright © William G. Cafiero, 2000 Page 6
GE Information Services XML Highlights Data that in X 12 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! Copyright © William G. Cafiero, 2000 Page 7
GE Information Services 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 Copyright © William G. Cafiero, 2000 Page 8
GE Information Services XML = e. Xtensible Markup Language • 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. w 3. org Copyright © William G. Cafiero, 2000 Page 9
GE Information Services This is an XML document <? XML version=“ 1. 0”? > <Basket>My Fruit Basket <Oranges count=” 5”/> <Apples count=” 1”>Macintosh</Apples> </Basket> Copyright © William G. Cafiero, 2000 Page 10
GE Information Services 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 Copyright © William G. Cafiero, 2000 Page 11
GE Information Services 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 Copyright © William G. Cafiero, 2000 Page 12
GE Information Services 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. Copyright © William G. Cafiero, 2000 Page 13
GE Information Services 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) Copyright © William G. Cafiero, 2000 Page 14
GE Information Services 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 “wellformed” • Some parsers also can read in a DTD, and validate the document against the DTD description. – These are called “validating” parsers Copyright © William G. Cafiero, 2000 Page 15
GE Information Services XML Processing XSL Processor DTD XML Parser XSL Style Sheet HTML (e. g. Browser) Other (e. g. Directly into Application) XML Data Source Copyright © William G. Cafiero, 2000 Page 16
GE Information Services XML Parse Tree Example Source Document Bookshop. XML Copyright © William G. Cafiero, 2000 Page 17
GE Information Services Copyright © William G. Cafiero, 2000 XML Parse Tree Example Page 18
GE Information Services XML - Basic Concepts Summary • XML is a markup language - version 1. 0 by the W 3 C 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. ) Copyright © William G. Cafiero, 2000 Page 19
GE Information Services Section 3 - Current Developments Why use XML for E-Commerce? : • XML bridges the gap between traditional EDI and Webbased 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. Many approaches are under development: • Biz. Talk • Commerce. Net • OASIS • EDIFACT • X 12 • etc. Copyright © William G. Cafiero, 2000 Page 20
GE Information Services Biz. Talk (http: //www. biztalk. org) Microsoft has published a defacto “standard” for XML documents as Biz. Talk Framework v 1. 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 Biz. Talk Framework documents • The documents must use the XML Data Reduced Subset (XDR) • Biz. Talk messages typically contain one document along with additional information used by the application Copyright © William G. Cafiero, 2000 Page 21
GE Information Services 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 Copyright © William G. Cafiero, 2000 Page 22
GE Information Services Using XML for EDI ASC X 12: X 12 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 X 12 -XML documents and interoperability between implementations • Express transaction set structure explicitly with XML structure • Enable creation of “well-formed” XML documents Copyright © William G. Cafiero, 2000 Page 23
GE Information Services Using XML for EDI 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 X 12 efforts in this area as a potential example of how a syntax might look Copyright © William G. Cafiero, 2000 Page 24
GE Information Services Commerce. One, Ariba and Rosetta. Net Other approaches • Commerce. One 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 c. XML procurement http: //www. ariba. com • Industry coalition driven – Healthcare, finance, accounting, automotive – Rosetta. Net http: //www. rosettanet. org, OBI Copyright © William G. Cafiero, 2000 Page 25
GE Information Services Object Orientated EDI OO-EDI (“Future Direction of EDI” work in X 12) • 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 Copyright © William G. Cafiero, 2000 Page 26
OO-EDI GE Information Services Future OO-EDI Implementation In-house Objects Distributed Object Transport (perhaps with XML) In-house Objects OO-EDI Scenarios (UML Models) Common Business Objects Copyright © William G. Cafiero, 2000 Page 27
A Possible “Coming Together” GE Information Services Industry Consortiums Core technology standards. XML, Schema, DOM, XSL, namespaces, linking, XHTML, RDF, XML Query MRO Buying on the Internet The XML Industry portal. A vendor neutral XML schema clearinghouse. Info on how to apply XML in industrial and commercial settings IT Supply Chain initiative CBL Accelerating the adoption of industry standards. 100+ member companies United Nations Centre for the facilitation of Administration, Commerce and Transport eb. XML e. XML Copyright © William G. Cafiero, 2000 XML/EDI Page 28
GE Information Services Section 4 - X 12 Example Using XML with X 12 based EDI Copyright © William G. Cafiero, 2000 Page 29
GE Information Services Defining Tags for XML/EDI 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. Copyright © William G. Cafiero, 2000 Page 30
GE Information Services Defining Tags for XML/EDI (Cont. ) The X 12 EDI Version: • The N 1 Segment N 1*SH*Tarheel Systems*1*2736541*07*SH Copyright © William G. Cafiero, 2000 Page 31
GE Information Services Defining Tags for XML/EDI (Cont. ) The XML Verbose Version: <N 1 -Name> <Entity. IDCode>SH</Entity. IDCode> <Name>Tarheel Systems</Name> <IDCode. Qual>1</IDCode. Qual> <IDCode>2736541</IDCode> <Entity. Relation. Code>07</Entity. Relation. Code> <Entity. IDCode>SH</Entity. IDCode> </N 1 -Name> Copyright © William G. Cafiero, 2000 Page 32
GE Information Services Defining Tags for XML/EDI (Cont. ) The XML Compact Version: <XN 1> <X 0098>SH</X 0098> <X 0093>Tarheel Systems</X 0093> <X 0066>1</X 0066> <X 0067>2736541</X 0067> <X 0706>07</X 0706> <X 0098>SH</X 0098> </XN 1> Copyright © William G. Cafiero, 2000 Page 33
GE Information Services Using XML for EDI A Sample X 12 EDI transaction in XML: • A fellow named John Doe from Battle Creek, MI decides to make a purchase using an X 12 -xml Purchase Order (TS 850) • 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. Copyright © William G. Cafiero, 2000 Page 34
GE Information Services A Sample X 12 EDI transaction in XML <? xml version=“ 1. 0”? > <set 850 -1 -010> <seg. ST 01>850</seg. ST 01> <seg. ST 02>9999</seg. ST 02> </set 850 -1 -010> <set 850 -1 -020> <seg. BEG 01>00</seg. BEG 01> <seg. BEG 02>SA</seg. BEG 02> <seg. BEG 03>123456</seg. BEG 03> <seg. BEG 05>19981001<seg. BEG 05> </set 850 -1 -020> <set 850 -1 -310 -loop> <set 850 -1 -310> <seg. N 101>ST</seg. N 101> <seg. N 102>John Doe</seg. N 102> </set 850 -1 -310> <set 850 -1 -330> <seg. N 301>281 Apple Street</seg. N 301> </set 850 -1 -330> <set 850 -1 -340> <seg. N 401>Battle Creek</seg. N 401> <seg. N 402>MI</seg. N 402> </set 850 -1 -340> Copyright © William G. Cafiero, 2000 Page 35
GE Information Services A Sample X 12 EDI transaction in XML (cont) </set 850 -1 -310 -loop> </set 850 -2 -010 -loop> <set 850 -2 -010> <seg. PO 102>1</seg. PO 102> <seg. PO 103>EA</seg. PO 103> <seg. PO 104>35. 73</seg. PO 104> <seg. PO 106>GE</seg. PO 106> <seg. PO 107>Hammer</seg. PO 107> </set 850 -2 -010 -loop> <set 850 -3 -030> <seg. SE 01>7</seg. SE 01> <seg. SE 02>9999</seg. SE 02> </set 850 -3 -030> </set 850> As you can see, an EDI transaction in XML can be VERY verbose! (but the internet is “free” isn’t it) Copyright © William G. Cafiero, 2000 Page 36
GE Information Services What’s Next? The Path Forward in X 12: • The X 12 White Paper was presented at the October 1998 X 12 Meeting for review. • An X 12 Project Proposal was submitted for the creation of an X 12 Technical Report as a reference model for representing EDI data elements in XML. • The X 12 Technical Report is targeted to be out of committee in June of 1999 after which it could be considered as an X 12 Standard. But, as we saw this week, it looks like X 12 will support eb. XML activities Copyright © William G. Cafiero, 2000 Page 37
GE Information Services Conclusion 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. What is a Legacy System? One that works! Copyright © William G. Cafiero, 2000 Page 38
97b9f42cebb07c0eae1cea1740e55be5.ppt