xml for dummies and managers l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
XML for Dummies (and managers) PowerPoint Presentation
Download Presentation
XML for Dummies (and managers)

Loading in 2 Seconds...

play fullscreen
1 / 34

XML for Dummies (and managers) - PowerPoint PPT Presentation


  • 127 Views
  • Uploaded on

XML for Dummies (and managers). Mark Pascall Technical Architect. Overview . What is XML? Extensible Markup Language Many pieces in the XML puzzle Very fast moving First – back to basics…. XPointer. Xlink. HTML. XML. XML Schema. XSLT. Namespace. XQuery. SOAP.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'XML for Dummies (and managers)' - taylor


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
xml for dummies and managers

XML for Dummies (and managers)

  • Mark Pascall
  • Technical Architect
overview
Overview
  • What is XML?
  • Extensible Markup Language
  • Many pieces in the XML puzzle
  • Very fast moving
  • First – back to basics….

XPointer

Xlink

HTML

XML

XML Schema

XSLT

Namespace

XQuery

SOAP

how the internet works
How the Internet works….

Get me that text file

OK here it is

Web Clients

(Browser)

Web Server

hypertext mark up language
Hypertext Mark-up Language

<h1>Here is the title</h1>

<p>This is a piece of <b>Text</b> </p>

  • A formatting language
  • Browser knows how to interpret the tags.
what is extensible markup language
What is Extensible Markup Language?
  • NOT a markup language
  • Meta-markup Language
  • Set of very simple rules
  • XML provides a uniform method for describing and exchanging structured data
  • Describes structure and semantics, not formatting
slide6

Meta Language

  • Use letters of alphabet.
  • Spaces between words.
  • Read from left to write.
  • …..

French

English

German

…..

slide7

XML Specification

  • Tags must not overlap
  • Tags case-sensitive
  • Must have root tag
  • ……

SVG

WML

MathML

…..

the xml rules
The XML Rules….
  • Single, unique root element
  • Matching open/close tags
  • Consistent capitalisation
  • Correctly nested elements (no overlapping elements)
  • Attribute values enclosed in quotes
  • No repeating attributes in an element

<?xml version=“1.0”?>

<company id=“4859”>

  • <name>3Months.com</name>
  • <type>Web Development</type>
  • <address>

<street>Wakefield st</street>

<city>Wellington</city>

<country>New Zealand</country>

  • </address>

</company>

Well Formed

history of xml
History of XML
  • Standard Generalised Markup Language
  • Been around since early 90’s
  • XML is a sub-set of SGML (SGML-lite)
  • XML has smaller and simpler syntax
  • SGML’s development provides the foundation for XML
  • XML is therefore not “bleeding edge”
why xml is so powerful
Why XML is so powerful
  • Provides international, vendor independent standard for describing information
  • Any information – structured or unstructured

XML

HTTP

TCP/IP

xml markup languages vocabularies
XML Markup languages/vocabularies
  • Remember XML is a meta-language
  • Anybody can create their own language
  • Why would you want to?
  • Each language designed for a specific purpose….
mathematical markup language mathml
Mathematical Markup Language (MathML)

x2 + 4x + 4 =0

<apply><plus/>

<apply><power/>

<ci>x</ci>

<cn>2</cn>

</apply>

<apply> <times/>

<cn>4</cn>

<ci>x</ci>

</apply>

<cn>4</cn>

</apply>

synchronized multimedia integration language smil
Synchronized Multimedia Integration Language (SMIL)

<DIV CLASS=“time” t:timeline=“seq”>

<P class=“time” t:dur=“1”>

This appears for one second and goes away

</P>

<P class=“time” t:dur=“1”>

This appears after one second, remains visible for one second and goes away

</P>

<P class=“time” t:dur=“1”>

This appears after two seconds, remains visible for one second and goes away

</P>

</DIV>

vector markup language
Vector Markup Language

<v:shape style=‘top: 0; left: 0; width: 250; height: 250’ stroke=“true” strokecolor=“red” strokeweight=“2” fill=“true” fillcolor=“green” coordorigin=“0 0” coordsize=“175 175”>

<v:path v=“m 8,65 l 72,65,92,11,112,65,174,65,122,100,142,155,92,121,42,155,60,100

x e”/>

</v:shape>

wireless markup language
Wireless Markup Language

<wml>

<!-- root element -->

<card id="card1" title="Example 1">

<p> <!-- a card can only contain P blocks or DO blocks -->

<do type="accept" label="go to card 2">

<go href="#card2"/></do> This is the first card. </p>

</card> <card id="card2" title="Example 1">

<p> This is the second card. </p>

</card>

</wml>

hypertext markup language html
Hypertext Markup Language (HTML)

<h1>The Title</h1>

<p>This is a piece of <b>HTML </b> </p>

  • Or is it??
  • Next version of HTML = XHTML
xml schemas and dtds
XML Schemas and DTDs
  • XML is about communication
  • Need to speak the same language
  • Schemas/DTDs describe the vocabulary of the language
  • i.e. what tags are used and how they can be organised
  • Schemas will replace DTDs
an example schema
An Example Schema

<?xml version="1.0" encoding="UTF-8"?>

<PressRelease>

<Title>Studend Loan Problems</Title>

<Date>20/7/01</Date>

<Content>Bla Bla Bla</Content>

</PressRelease>

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xsd:element name="PressRelease">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Title" type="xsd:string"/>

<xsd:element name="Date" type="xsd:date"/>

<xsd:element name="Content" type="xsd:string"/>

<xsd:element name="Author" type="xsd:string" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

introducing xsl t
Introducing XSL-T
  • Extensible Stylesheet Language
  • Standard ratified this year by W3C
  • Way of transforming an XML document into another document
transformation
Transformation

XSLT

document

Text

XML

document

HTML

XSLT Processor

XML

summary
Summary
  • The XML Specification = Meta-language for describing XML Mark-up languages
  • XML Schemas (and DTD’s) describe the structure of a particular XML Mark-up language
  • XSL-T documents transform XML document into another format (HTML, XML etc)
agenda
Agenda
  • Case study background
  • Choosing a DTD/Schema
  • Creating XML – the options
  • Storing XML – the options
  • Presenting XML – the options
  • Solution Benefits
  • Demo
case study background
Case study background
  • October 2001 – won contract to redevelop E-government website (www.e-government.govt.nz)
  • Business requirements
    • Usual stuff (accessible, usable etc)
    • Guidelines compliant (squeaky clean)
      • “Content must be made available in a standard HTML format. Where information is provided in a proprietary format an alternative HTML version must also be made available.”
      • Can’t just put it up as a PDF anymore
    • Simple publishing process
    • Future-proofed
  • Constraints
    • Limited budget
    • Tight timeframe
traditional options
Traditional options
  • Static site
    • Did not give simple publishing process for “unskilled” people
  • Content Management System
    • Store information in RDBMS
    • Not good for “document centric” applications
    • Cost, timeframe, simple workflow requirements
slide26
The challenge
    • To create a system that allows non-technical authors to publish to guidelines compliant HTML (and eventually other formats)
  • The solution
    • XML
choosing a dtd schema
Choosing a DTD/Schema
  • Make up your own
  • Don’t reinvent the wheel!
  • Xml.org
  • We selected a subset of DocBook
    • Could handle all the information we needed to store
    • Supported by a growing number of products
  • NZETC uses TEI
creating xml the options
Creating XML – the Options
  • Use an XML editor
    • E.g. XML Spy, Xmetal, Framemaker etc
    • Allow you to create a document that conforms to a specified DTD/Schema
    • Problem: everybody potentially an author
  • Convert Word documents to XML
    • Styles
slide29

HTML

(Internet)

XSL-T for convertion

Word

(using Styles)

DocBook

XML

eBook

Anything you want!!

Word is authoritative source

storing xml the options
Storing XML – the Options
  • Relational database
  • Native XML Repository
    • E.g. Excelon, Tamino, Ipedo, Xindice
    • First generation products
    • At the time too immature/expensive
  • On the file system
presenting xml the options
Presenting XML – the Options
  • Publishing to humans
  • Need to “transform” XML to a format appropriate for humans
  • Physical print – out of scope
  • HTML obvious choice
  • XSL-T to transform XML to HTML
  • Not the only way to present to humans
    • SMIL, SVG, MathML etc
    • Audience must have software
  • What about publishing “Raw” XML?
slide33

Organisation B Website

Organisation C Website

Organisation A Website

XML

document

XML

document

HTML

document

HTML

document