Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML: More than just a cool acronym? Michael Mason DecisionSoft Limited.

Similar presentations


Presentation on theme: "XML: More than just a cool acronym? Michael Mason DecisionSoft Limited."— Presentation transcript:

1 XML: More than just a cool acronym? Michael Mason DecisionSoft Limited

2 Who am I? n Mike Mason, mgm@oxlug.org n Oxford University, BA Computation n CompSoc Secretary 1997/98 n Joined DecisionSoft June 1999, after spending 3 vacations as an intern

3 Who are DecisionSoft? n Software startup established December 1997, with US venture capital backing n Based in the Oxford Science Park n Currently developing an XML tool suite, based around XML Script n Products include X-Tract (command line utility) and X-Stream (server version)

4 Outline of today's talk n What is XML? n XML Standards n Web apps and XML n XML Transformations n XSL and XML Script n X-Tract demo

5 What is XML? n eXtensible Markup Language n Subset of SGML (Standardized Generalized Markup Language) n Like HTML, but with user-defined tags. It’s got a cool name ;-) It’s got a cool name ;-)

6 XML is all about data HTML example: Invoice Invoice From: Joe Bloggs From: Joe Bloggs To: A. Another To: A. Another Date: 2/1/1999 Date: 2/1/1999 Amounted: $100 Amounted: $100 Tax: 21% Tax: 21% Total $121 Total $121 Data mixed with presentation

7 XML is all about data XML example: <Invoice> Joe Bloggs Joe Bloggs A. Another A. Another 100 100 21 21 121 121 </Invoice> Human Readable Comes with Tags

8 XML is all about data n Separates data (structure) from presentation n Same XML data can be used to render to HTML, WML (Wireless Markup Language), LaTeX, etc... n Data interchange -- any XML-enabled application can talk to any other

9 Well-Formed XML n Text must conform to certain rules to be considered “well formed” Matching opening and closing tags, or self-closing ( ) tags Matching opening and closing tags, or self-closing ( ) tags n Tags are properly nested n If it’s not well formed, it’s not XML

10 Well formed XML XML example: <Invoice> Joe Bloggs Joe Bloggs A. Another A. Another 100 100 21 21 121 121 </Invoice> Matched Tags Self closing Tags

11 Valid XML n An XML document is “valid” if it includes a description of the tags it may contain n We can throw out invalid XML easily… n E-commerce transactions can be checked easily (e.g. non-negative quantity on an order form) n XML data from a foreign source can be validated before we accept it

12 Valid XML n Document Type Definitions (DTDs) are the current standard n Specify patterns for the tags contained in the XML document n Written in a different (non-XML) format n Weak data-typing, based on string substitution n Other validation methods possible, with fewer drawbacks: Schema

13 Valid XML <Invoice> Joe Bloggs Joe Bloggs A. Another A. Another 100 100 21 21 121 121 </Invoice> Document Type Definition XML version declaration

14 Valid XML <!ATTLIST Date year CDATA #REQUIRED year CDATA #REQUIRED month CDATA #REQUIRED month CDATA #REQUIRED day CDATA #REQUIRED> day CDATA #REQUIRED> <!ATTLIST Amount unit (’$’|’£’|’¥’) ’$’> unit (’$’|’£’|’¥’) ’$’> Sub-element requirements Choice list with default

15 XML Schema n More functionality than DTDs n Written in XML n Not yet a W3C recommendation -- confusion over what a “Schema” is n Xschema, XML Schema, XML-Data,...

16 XML Standards n XML is a World Wide Web Consortium (W3C) recommendation, v1.0 approved 10th February 1998 http://www.w3.org/TR/REC-xml http://www.w3.org/TR/REC-xml n Other standards available online -- DTD, Xpointer, etc. Draft standards for XML Schema, XSL, etc. also available. n http://www.xml.com/xml/pub/listrescat

17 Web apps and XML (or: Why you should care about XML) n One data source, multiple outputs n XML  HTML is the obvious one n XML as a data interchange format n Inherent extensibility -- e.g. Microsoft’s Channel Definition Format n XML is the format for e-commerce n Vendor independence

18 XML Transformations n The great thing about standards is there’s so many to choose from… n Need to translate to/from XML and other formats n e.g. HTML rendering of XML in IE5 n e.g. LaTeX rendering of XML for printing n Need a language to describe these XML transformations

19 XSL and XML Script n XSL (XML Style Language) is a W3C draft proposed by Microsoft n XML Script created by DecisionSoft as a scripting language for regression tests n The two overlap (but we think XSL’s functionality is a subset of that provided by XML Script)

20 X-Tract demo http://www.xmlscript.org/ http://www.xmlscript.org/ n Linux and Win32 versions (server version is currently Linux only ;-) n We’ll convert the XML Invoice seen earlier into browser-ready HTML


Download ppt "XML: More than just a cool acronym? Michael Mason DecisionSoft Limited."

Similar presentations


Ads by Google