Introduction to XML

Download Report

Transcript Introduction to XML

XML
An Introduction
February 27th 2001
brian thompson
design.interpretive
Nortel Networks
XML Introduction
design.interpretive
Page 1
XML Adoption
XML Introduction
design.interpretive
Page 2
XML Alphabet Soup
ACORD - XML for the Insurance
Industry
adXML.org: XML for Advertising
aecXML Working Group Architecture, Engineering and
Construction
Alexandria Digital Library Project
ALURe (Aggregation and Logging of
User Requests) XML Specification
ANSI ASC X12/XML and DISA
Apache XML Project
Artificial Intelligence Markup
Language (AIML)
ASTM XML Document Type
Definitions (DTDs) for Health Care
Astronomical Instrument Markup
Language (AIML)
Astronomical Markup Language
ATLA Serials Project (ATLAS)
Bank Internet Payment System
(BIPS)
Bean Markup Language (BML)
BiblioML - XML for UNIMARC
Bibliographic Records
Bioinformatic Sequence Markup
Language (BSML)
BIOpolymer Markup Language
(BIOML)
BizCodes Initiative
BizTalk Framework
Broadcast Hypertext Markup
Language (BHTML)
Business Rules Markup Language
(BRML)
Call Policy Markup Language
(CPML)
Call Processing Language (CPL)
Capability Card: An Attribute
Certificate in XML
Case Based Markup Language
CDIF XML-Based Transfer Format
Channel Definition Format, CDF
(Based on XML)
European XML/EDI Pilot Project
Open Applications Group - OAGIS
Using XML for RFCs
Extensible Business Reporting
Language (XBRL)
Extensible Financial Reporting
Markup Language (XFRML)
Open Catalog Protocol (OCP)
vCard Electronic Business Card
Open Content Syndication (OCS)
Vector Markup Language (VML)
Extensible Forms Description
Language (XFDL)
Extensible Protocol
Open eBook Initiative
Virtual Hyperglossary (VHG)
Open Financial Exchange (OFX/OFE)
VISA XML Invoice Specification
Extensible Rights Markup Language
(XrML)
Extensible Scientific Interchange
Language (XSIL)
Extensible Telephony Markup
Language (XTML)
Extensible User Interface Language
(XUL)
Financial Products Markup Language
(FpML)
FinXML - 'The Digital Language for
Capital Markets'
FIXML - A Markup Language for the
FIX Application Message Layer
FLBC (Formal Language for
Business Communication) and KQML
FlowML: A Format for Virtual
Orchestras
GedML: [GEDCOM] Genealogical
Data in XML
Gene Expression Markup Language
(GEML)
Georgia State University Electronic
Court Filing Project
Graphic Communications Association
- GCA 'Paper' DTD
Guideline XML (gXML)
Health Level Seven XML Patient
Record Architecture
HR-XML Consortium
HTML Threading - Use of HTML in
Email
HTTP Distribution and Replication
Protocol (DRP)
Human Resource Management
Markup Language (HRMML)
iCalendar XML DTD
IEEE LTSC XML Ad Hoc Group
IEEE Standard DTD
Open Settlement Protocol (OSP) ETSI/TIPHON
Open Software Description Format
(OSD)
OpenMath Standard
OpenMLS - Real Estate DTD Design
OpenTag Markup
OpenTravel Alliance (OTA)
P3P Syntax Specification: Platform for
Privacy Preferences
Petrotechnical Open Software
Corporation (POSC) XML Related
Projects
PetroXML Initiative
Portable Site Information (PSI)
Portal Markup Language (PML)
Precision Graphics Markup Language
(PGML)
Predictive Model Markup Language
(PMML)
Procedural Markup Language (PML)
Process Interchange Format XML (PIFXML)
Process Specification Language (PSL)
and XML
Product Data Markup Language (PDML)
VoiceXML Forum (Voice Extensible
Markup Language Forum)
VoxML Markup Language
W3C Document Object Model (DOM),
Level 1 Specification
W3C Scalable Vector Graphics (SVG)
W3C Specifications Documentation
WAP Wireless Markup Language
Specification
WDDX - Web Distributed Data
Exchange
Weather Observation Definition Format
(OMF)
Web Collections using XML
Web Interface Definition Language
(WIDL)
Web Standards Project (WSP)
WebBroker: Distributed Object
Communication on the Web
WEBDAV (IETF 'Extensions for
Distributed Authoring and Versioning on
the World Wide Web')
X-ACT - XML Active Content
Technologies Council
XCES: Corpus Encoding Standard for
XML
XHTML-FML: Forms Markup Language
XLF (Extensible Log Format) Initiative
Product Definition Exchange (PDX)
XML and CORBA
Project Management XML Schema
XML and Forms
QAML - The Q&A Markup Language
RDF Rich Site Summary (RSS)
Real Estate Transaction Markup
Language (RETML)
XML and Music
XML and VRML (Virtual Reality
Modeling Language) - X3D
XML Belief Network File Format
(Bayesian Networks)
XML Introduction
design.interpretive
Page 3
What is XML?
eXtensible
Markup
Language
Extensible
Unlike HTML, XML provides the tools to create new markup vocabularies or extend existing ones
Markup
Descriptive markup scheme based on generic identifiers used to assign names to logical units of content
Language
The grammar to be used in describing document structures where documents are any form of human communication
XML Introduction
design.interpretive
Page 4
XML adapts with change
Fixed System
Limited Access / Limited Use
Stable Organizational Boundaries
Rigid Processes
Tight Control
Variable System
Wide and Variable Access
Variable Organizational Boundaries
Multiple Dynamic Processes
Limited Control
Limited Flexibility
Infinite Flexibility
Closed Systems
Open Systems
XML Introduction
design.interpretive
Page 5
XML
An XML Document can take the form of self-documented Data Structure
<?XML version=“1.0” encoding=“UTF-8” standalone=“yes” ?>
<!DOCTYPE invoice [
<!ELEMENT invoice (to, from, po, amount) >
<!ELEMENT to (#PCDATA) >
<!ELEMENT from (#PCDATA) >
<!ELEMENT po (#PCDATA) >
<!ELEMENT amount (#PCDATA) >
<!ATTLIST amount
currency (USD,CA, EURO) #REQUIRED > ]>
Declared
Structural
Rules
govern
<invoice>
<to>Packet Components</to>
<from>Switches Unlimited</from>
<po>KN00123A-2000</po>
<amount currency=“USD”>14,599.00</amount>
</invoice>
Document
Content
XML Introduction
design.interpretive
Page 6
XML and SGML
SGML(1986):
SGML
Standard
Generalized
Markup
Language
“XML is a
simplified subset
of SGML
specially designed
for Web Applications”
Jon Bosak, Father of XML
Sun Microsystems
XML
DSSSL
HyTime
XML(1998): Extensible Markup Language
CALS Tables
& FOSI
XSL
XSLT
XHTML
XML Schema
HTML
XLink
XPath
XPointer
Namespaces
XML Introduction
design.interpretive
Page 7
The XML Universe
Markup Languages: Vocabularies
VoiceML
Rosetta
Net
OFX
XMI
XHTML
MathML
SMIL
SVG
WML
Semantic Web: XML Foundation
XSL
(Display)
XSLT
(Transform)
XLink
(Relate)
XPath
(Address)
XPointer
(Address)
XQuery
(Address)
XML Schema
(Describe)
Namespaces
(Classify)
HL7
BizTalk
ebXML
XML(1998): Extensible Markup Language
SGML(1986): Standard Generalized Markup Language
XML Introduction
design.interpretive
Page 8
XML Declaration
XML version
UCS Transformation Format
<?XML version=“1.0” encoding=“UTF-8” standalone=“no” ?>
Processing Instruction
UCS - Universal Character Set
XML Introduction
design.interpretive
Page 9
Document Type Declaration
Grammar for a class of documents
Document Type
External Subset
Internal Subset
<!DOCTYPE TESTSUITE SYSTEM "testcases.dtd" [ ]>
Document Type Declaration
<!ELEMENT TESTSUITE (TESTCASES+)>
<!ATTLIST TESTSUITE PROFILE CDATA #IMPLIED >
<!ELEMENT TESTCASES (TEST|TESTCASES)*>
<!ATTLIST TESTCASES PROFILE CDATA #IMPLIED >
<!ELEMENT TEST (#PCDATA | EM | B)*>
<!ATTLIST TEST
URI
CDATA
#REQUIRED
ID
ID
#REQUIRED
TYPE
(valid|invalid|not-wf|error)
#REQUIRED >
XML Introduction
design.interpretive
Page 10
Document Type Definitions
Rules that govern a class of documents
DTD
for a Class of
Documents
testcases.dtd
Governs
Document
Instance
testcase1a.xml
<!ELEMENT TESTSUITE (TESTCASES+)>
<!ATTLIST TESTSUITE PROFILE CDATA #IMPLIED >
<!ELEMENT TESTCASES (TEST|TESTCASES)*>
<!ATTLIST TESTCASES PROFILE CDATA #IMPLIED >
<!ELEMENT TEST (#PCDATA | EM | B)*>
<!ATTLIST TEST
URI
CDATA
#REQUIRED
ID
ID
#REQUIRED
TYPE
(valid|invalid|not-wf|error)
#REQUIRED >
<?xml version="1.0"?>
<!DOCTYPE TESTSUITE SYSTEM "testcases.dtd" [ ]>
<TESTSUITE PROFILE="OASIS Conformance Tests, v1.0">
<TESTCASES PROFILE="Sun Microsystems XML Tests">
<TEST URI "valid/dtd00.xml" ID="dtd00" TYPE="valid">
Tests parsing of alternative forms of text-only mixed
content declaration.</TEST>
</TESTCASES>
</TESTSUITE>
XML Introduction
design.interpretive
Page 11
The XML Family
XML Implementation Components
Semantic Web: XML Foundation
XSL
(Display)
XSLT
(Transform)
XLink
(Relate)
XPath
(Address)
XPointer
(Address)
XQuery
(Address)
XML Schema
(Describe)
Namespaces
(Classify)
XML(1998): Extensible Markup Language
Application
Core Functions
Retrieval Services
Enhanced Naming
Basic Grammar
XML Introduction
design.interpretive
Page 12
XSL
XML Implementation Components
Extensible Stylesheet Language (XSL)
<xsl:template match="name">
<p style="font-size : smaller;
margin-top : 0; margin-bottom: 0">
<a target="summary">
<xsl:attribute name="href">
<xsl:value-of select="@xlink:href"/>
</xsl:attribute>
<xsl:value-of select="@xlink:title"/>
</a>
</p>
</xsl:template>
Example: W3C XSL Spec
XML Introduction
design.interpretive
Page 13
XSL
XML Introduction
design.interpretive
Page 14
XSLT
XML Implementation Components
XSL Transformations (XSLT)
<xsl:template match="facepage">
<xsl:if test="/toc/@language[.='en']">
<p class="toc_contents">CONTENTS</p>
<p class="toc_date">
<xsl:value-of select="@day-name"/>,
<xsl:value-of select="@month"/>
<xsl:value-of select="@day"/>,
<xsl:value-of select="@year"/> </p>...
XML Introduction
design.interpretive
Page 15
XSLT
XML Introduction
design.interpretive
Page 16
XLink
XML Implementation Components
XML Linking Language (XLink)
<my:crossReference
xmlns:my="http://example.com/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="students.xml"
xlink:title="Student List"
xlink:actuate="onRequest">
Current List of Students
</my:crossReference>
XML Introduction
design.interpretive
Page 17
Xlink
XML Introduction
design.interpretive
Page 18
XPath
XML Implementation Components
XML Path Language (XPath)
child::* selects all element children of the context node
child::para[position()=last()] selects the last para child of the context node
child::para[position()=last()-1] selects the last but one para child
of the context node
XML Introduction
design.interpretive
Page 19
Xpath example - PO
XML Introduction
design.interpretive
Page 20
XQuery
XML Implementation Components
XML Query language
string-range(//title,”Yuri Rubinsky")[17]
Returns the 17th occurrence of “Yuri Rubinsky” within a Title Element
XML Introduction
design.interpretive
Page 21
XML Schema
XML Implementation Components
XML Schema (Structures and Datatypes)
<ElementType name = "primaryKey" content = "eltOnly" order = "seq">
<AttributeType name = "name" dt:type = "string" required = "yes"/>
<AttributeType name = "linkName" dt:type = "id" required = "yes"/>
<AttributeType name = "enabled" dt:type = "enumeration" dt:values = "yes no"
required = "yes"/>
<attribute type = "name"/>
<attribute type = "linkName"/>
<attribute type = "enabled"/>
<element type = "columnLink" minOccurs = "1" maxOccurs = "*"/>
</ElementType>
XML Introduction
design.interpretive
Page 22
Namespaces
XML Implementation Components
XML Namespaces
<x xmlns:edi='http://ecommerce.org/schema'>
<edi:price units='Euro'>32.18</edi:price></x>
The namespace for the element price is http://ecommerce.org/schema
XML Introduction
design.interpretive
Page 23
VoiceXML
Voice Extensible Markup Language
Designed for creating audio dialogs with synthesized speech and speech
recognition
Web enabling interactive voice response applications
Server
VoiceXML Interpreter
Context
Interpreter
<?XML version=“1.0”?>
<vxml version=“1.0”>
<form><field name=“drink”>
<prompt>Coffee or Tea?</prompt>
<grammar src=“drink.gram”
type=“application/x-jsqf”/></field>
<block><submit next=“http://www.drink.com” />
</block></form>
</vxml>
Platform
XML Introduction
design.interpretive
Page 24
WML
Wireless Markup Language
<?XML version=“1.0”?>
<wml>
<card id=“abc” ordered=“true”>
<p><do type=“accept”><go href=“http://www.xyz.org” /></do>
X: $(X)<br/>
Y: $(&#59:)<br/>
Enter Name: <input type=“text” name=“N” />
</p></card></wml>
XML Introduction
design.interpretive
Page 25
WML
WML allows for content to accessed
from a low bandwidth (14.4kb)
wireless device
XML Introduction
design.interpretive
Page 26
RosettaNet
Technology Supply Chain Integration
Provides a methodology for building interchange solutions
XML Introduction
design.interpretive
Page 27
RosettaNet
Every partner speaks the same language
XML Introduction
design.interpretive
Page 28
SVG
Scalable Vector Graphics
A language for describing 2-dimensional graphics in XML
(vector graphic shapes, graphics animation, images and text (XML))
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg SYSTEM "http://www.w3.org/TR/2000/CR-SVG20001102/DTD/svg-20001102.dtd">
<svg width="5cm" height="5cm">
<desc>Two groups, each of two rectangles</desc>
<g id="group1" style="fill:red">
<rect x="1cm" y="1cm" width="1cm" height="1cm" />
<rect x="3cm" y="1cm" width="1cm" height="1cm" /> </g>
</svg>
XML Introduction
design.interpretive
Page 29
SVG example – Moscow Network
Zoom in and out without loss of detail
Add or remove elements to filter image
XML Introduction
design.interpretive
Page 30
SVG example – Tiger Zoom
Graphic can be sent to any device
XML Introduction
design.interpretive
Page 31
ICE
Information and Content Exchange(ICE)
Creates a common language and protocol for the automatic exchange of content
assets
Integrating web assets from the perspective of users:
Individual and corporate consumers
Syndication Service Providers (Web Superstores)
Content Developers and Owners
Designed around a set of specific transactions were content is either sold, resold
or licensed.
<ice-response request-id="1998-07-05T02:03:[email protected]" >
<ice-code numeric="200" phrase="OK" message-id="1998-0811T12:34:[email protected]" >
</ice-code> </ice-response>
XML Introduction
design.interpretive
Page 32
ICE example
The subscriber is authorized to
receive content based on a
micro-transaction or subscription
XML Introduction
design.interpretive
Page 33
XML Routing Hardware
XML Introduction
design.interpretive
Page 34
XML
Designing with XML
February 27th 2001
brian thompson
design.interpretive
Nortel Networks
XML Introduction
design.interpretive
Page 35
Language and XML
Languages:
Encode meaning
Transmit through a context
Are decoded at the other end
XML:
Explicitly declares meaning
Can be altered in transmission
Can be understood by people and machines
XML Introduction
design.interpretive
Page 36
Designing with XML and XSL
Pairing the content with the filter creates opportunity
What collection of content gives the best opportunities for interpretation?
What collection of features produces the most dynamic mix?
What interplay of XML documents reveals opportunities?
How many ways can you look at the various combinations?
Using multiple channels, how can you make the experience more profound?
XML Introduction
design.interpretive
Page 37
Designing with XML and XLink
What associations might the active element have?
How do you show multiple associations?
What possible resources can you group together?
What if people are part of the matrix of resources?
What do combinations of the same resources produce?
Does the active element become changed through transmission?
XML Introduction
design.interpretive
Page 38
Finding out more about XML
Short tutorials on XML, XSL, DTD…
http://www.w3schools.com/
Web pages using XML
http://www.xmltree.com/
Scalable Vector Graphics
http://www.adobe.com/svg/viewer/install/main.html
Preside Web Framework: XML and SVG Standards
http://lbeaudoi-1/WebFramework/WFW_05.htm
XML and the Second-Generation Web
http://www.sciam.com/1999/0599issue/0599bosak.html
XML W3C Definition
http://www.w3.org/XML/
XML based routing hardware
http://www-us-east.intel.com/netstructure/products/xml_7210.htm
XML Introduction
design.interpretive
Page 39