Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.

Similar presentations


Presentation on theme: "XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info."— Presentation transcript:

1

2 XML – Extensible Markup Language

3 XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.

4 Major Roles for XML

5 Store Data XML Schema XML Document

6 XML Schema Exchange Data XML Document

7 Present Info XSL Stylesheet 1 XSL Stylesheet 2 XML Document Client Access to XML Data

8 Simplify Data Capture (eventually) Database Data encapsulation into data node Insert data node

9 XML Includes … XForms Model XHTML XPath XSLT XSL-FO XForms Processor XSL Parser Rendering Agent XSD HTML Marked up text

10 XML Documents -

11 An XML Document … A text document. Stores data. Data items are delimited using tags. Hierarchical structure. -

12 5003 Jane 2003-01-01 -27.85 2003-01-07 49.50 Tags: Delimit data. Show meaning. You make tags! Data: Rich data types. Constraints.

13 Well Formed XML 1.All data items are between tags. 2.Closing tags start with /. 3.Tags are case sensitive. 4.No spaces or symbols in tags. (Data may contain spaces and some symbols.) 5.Tags balance.

14 Tags and Data 5003 Jane 2003-01-01 -27.85

15 Well Formed? Homer Simpson 123.45 123.45 15

16 XML Document Structure Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Customers Transaction TDate Amt 1/3/03 58.85 5003 Jane 2003-01-01 -27.85 2003-01-07 49.50 5004 Tom 2003-03-03 58.85

17 Hierarchy of Nodes Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Transaction TDate Amt 1/3/03 58.85 Customers / Root Node Document Element or Document Node Node or Complex Element (Simple) Element

18 Key to Understanding? Meaningful, descriptive tag names! 103.95

19 XML Schemas

20 An XML Schema … Defines the structure of an XML document. –Nodes. –Hierarchy. Defines the elements in each node. –Tag. –Data type. –Constraints. XML Schema XML Document

21 Valid XML Document XML Schema XML Document Well formed. XML document conforms to structure defined in XML schema.

22 XML Schema XML Schema - Exchange Data XML Document Based on Standards

23 Defining an XML Schema Identify Data Requirements Specify Tags Specify Structure Agree on Definitions

24 Some Major XML Standards EFT Direct Deposit Open Financial Exchange (OFX) EDI XML/EDI and electronic business using XML (ebXML) eXtensible Business Reporting Language (XBRL) Financial Reporting Tax Reporting IRS e-file Standards

25 5003 Jane 2003-01-01 -27.85 2003-01-07 49.50 5004 Tom 2003-03-03 58.85 Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Transaction TDate Amt 1/3/03 58.85 Customers

26 Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Transaction TDate Amt 1/3/03 58.85 Customers

27 … Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Transaction TDate Amt 1/3/03 58.85 Customers

28 … Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Transaction TDate Amt 1/3/03 58.85 Customers

29

30 Validating XML Documents Use software or web tools. –Topologi Schematron Validator. www.topologi.com –GotDotNet Schema Validator. http://apps.gotdotnet.com/xmltools/xsdvalidator/

31 XSL Stylesheet, etc.

32 An XSL Stylesheet … Gets and filters nodes in an XML document. Transforms nodes. Formats output.

33 Many XSL Stylesheets XSL Stylesheet #1 XSL Stylesheet #2 XML Document

34 XSL Stylesheet “Languages” XML Path XPath: gets nodes using paths and filtering patterns. XSL Transformations XSLT: transforms a document tree into a new document tree. XSL-Formatting Objects XSL-FO: describes how output looks. (HTML on steroids!)

35 += Parsed and Rendered Output XML Document XSL Stylesheet

36 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> Customer Information Id: Name: Date: Amount: Transaction TDate Amt 1/1/03 -27.95 Transaction TDate Amt 1/7/03 49.50 Customer Id CName 5004 Tom Customer Id CName 5003 Jane Transaction TDate Amt 1/3/03 58.85 Customers

37 Alphabet Soup of Xtechs XML Schema XML Document XForms XForms Model XSL Stylesheet XHTML Marked up textXPath XSLT XSL-FO XForms Processor Editor & Validator XSL Parser Rendering Agent XSD Languages & Formats Software HTML

38


Download ppt "XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info."

Similar presentations


Ads by Google