XML 102 - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

XML 102

Description:

Goal - link systems electronically, but insulate them from each other, 'loosely coupled' ... Essential XML Quick Reference - Skonnard & Gudgin, AW developmentor ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 25
Provided by: michaelc93
Category:

less

Transcript and Presenter's Notes

Title: XML 102


1
XML 102
  • Mike Rawlins
  • Rawlins EC Consulting

2
Acknowledgements
  • NCHELP Summer Institute organizers
  • Post Secondary Electronic Standards Council
  • Members of PESC XML Forum

3
Topics
  • General issues questions
  • Bruce gave good introduction to XML
  • What else do you want to know?
  • Soup to nuts illustration of key technologies
  • Data analysis
  • Document and Schema design
  • XSLT transformations

4
Focus Interchange Format
  • Goal - link systems electronically, but insulate
    them from each other, loosely coupled
  • XML assists in creation of neutral interchange
    formats

5
Why XML?
  • Good
  • Fast
  • Cheap

6
What does it?
  • Programmer readable format
  • Free, standard code libraries
  • DOM - W3C Document Object Model
  • SAX - Simple API for XML
  • XSLT
  • Standard language for transformations
  • Free and low cost tools

7
Soup to Nuts
  • Data content based on X12 TS 190
  • Based on XML Forum approach
  • Instance document representation
  • W3C Schema
  • XSLT transform to HTML for Display
  • XSLT transform to XML for application
  • Loading into a business application

8
Example X12 190 Trans. Set
  • Student Enrollment Verification Response - School
    to National Student Loan Clearinghouse
  • Header data
  • Date, time, references
  • Enrollment information
  • Sender - school
  • Receiver - clearinghouse

9
Example - TS 190, continued
  • Student
  • Name, ID, birth date, address
  • School
  • Name, FICE number

10
Document Design Issues
  • A sample only!
  • Naming conventions
  • Semantically significant!
  • Abbreviations case
  • What language?
  • Elements only or Attributes too?

11
Document Design Issues
  • ltIDNum typeSSNgt123456789
  • ltIDNumgt
  • OR
  • ltIDNumgt
  • ltTypegtSSNltTypegt
  • ltValuegt123456789ltValuegt
  • ltIDNumgt

12
DISCLAIMER!!!
  • These are example documents to be used only for
    illustration of approach and technique. They do
    not represent XML Forum standards or work in
    progress.
  • In other words, this is all just Mikes stuff!

13
Instance Document
  • StudentEnrollmentVerificationResponse.XML
  • Disclaimer - Neither PESC nor the XML Forum
    endorse any particular XML product. XML Spy just
    happens to be the one that Mike likes and has
    licensed.

14
Instance Document Features
  • Based on XML Forum Combined Data Dictionary 2.0
  • Only uses elements
  • Minimal namespace prefixes
  • Date handling different from X12
  • Boolean instead of Yes/No
  • Uses several code lists from X12

15
Schema Document Features
  • Modular structure
  • Uses two namespaces (PESC XML will probably use
    several)
  • Extensive use of types
  • No global elements
  • Code validation, lengths, cardinality

16
Why XSLT for HTML?
  • One document, many uses
  • Separate presentation from content
  • Good software engineering, reinforces modularity

17
XLST Basics
  • XPath expressions
  • Walk the tree
  • Similar to UNIX directory paths
  • Template matches path expression
  • xslvalue-of inserts node value
  • xslapply-templates invokes another template at
    current context

18
XSLT for HTML Output
  • xsloutput methodhtml
  • Insert HTML code into a template
  • Values to be displayed as value-of
  • Stylesheet reference in instance XML
  • Version and tool incompatibilities
  • Beware of IE5!
  • IE6 and Netscape6 OK

19
Why XSLT for XML to XML?
  • There isnt going be just ONE XML language!
  • Transformation will be our salvation!

20
XSLT for XML Output
  • xsloutput methodxml
  • Insert XML markup for target document
  • Element and attribute values with value-of
  • Namespace considerations
  • Declare result namespaces
  • exclude-result-prefixes

21
Loading into an application
  • Native XML - XSLT transform to desired format
  • Non-XML expected
  • XSLT - can do but may not be best way
  • Program - custom or generalized program for XML
    lt-gt non-XML
  • Comma separated values
  • Flat files
  • EDI

22
Summary
  • Data and business process analysis is the same,
    regardless of technology
  • XML Schema enables validation
  • XSLT performs transformation
  • HTML for display
  • Application import/export

23
Recommended Resources
  • XML Forum Technical Specification
  • www.pescxml.org
  • World Wide Web Consortium
  • At www.w3c.org
  • XML Schema Recommendation
  • XSLT Recommendation
  • Tools
  • XML Spy - Altova - Win32 only
  • TurboXML - TIBCO - All Java platforms

24
Books
  • XSLT 2nd Edition - Michael Kay, Wrox
  • Essential XML Quick Reference - Skonnard
    Gudgin, AW developmentor
  • Using XML with Legacy Business Applications -
    Mike Rawlins, Addison Wesley (late 2002)
Write a Comment
User Comments (0)
About PowerShow.com