84
SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

  • View
    222

  • Download
    3

Embed Size (px)

Citation preview

Page 1: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

SP2001

Transparency No. 1

XML Technologies and Applications

Cheng-Chia Chen

Feb. 2002

Page 2: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 2

contents

What is XML ?Where does XML come from? What is its status?Why do we need XML ?XML v.s Other formatsCore XML Specifications and APIsHow can we do with XML?XML sitesA partial list of XML applications and industry

initiativesa sketch of XML documents

Page 3: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 3

What is XML ?

The eXtensible Markup Language a data-structure definition language : let you define the str

ucture and format of your own data. a data format (syntax) used for the representation, storag

e and transmission of data whose format it defined. Text-based markup Language, let you define your own HT

ML-like markup languages. Recommended by World Web Consortium (W3C) in Feb 1

998. intended to be used a new message format over the Intern

et to complement the inadequacy of HTML. a subset of SGML

is now very popular and becomes the dominating interchange format of information over the internet

Page 4: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 4

A Glimpse of a simple XML document

HTML source code for a product catalog: <TABLE BORDER=1>

<TR>

<TH>Product ID</TH>

<TH>Description</TH>

<TH>Price</TH>

</TR>

<TR>

<TD>12345678-Q</TD>

<TD>Mitac 5339-1</TD>

<TD>NT$60,000</TD>

</TR>

</TABLE>

Product ID Description Price

12345678-Q Thinkpad 2000D $60,000

Page 5: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 5

XML uses markup tags as well, but, describe the content, rather than the presentation of that content.

the same example coded in XML:

<product> <id> 12345678-Q </id> <description> Mitac 5339plus</description> <price> NT$60,000</price> </product>

Notes: 1. Only contents are encoded in the XML text. 2. All data are annotated by markups indicating their roles or fu

nctions in the message.

A glimpse of a simple XML document (cont’d)

Page 6: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 6

Where does XML come from ?

a simplified subset of the Standard Generalized Markup Language (SGML) standardized in 1986, based on the Generalized Markup Language invented by IBM in 1969

simplified for more general use on the Web and as a data interchange format. without losing extensibility, easier for anyone to write valid XML. easier to write a parser easier for the parser to quickly verify that documents are

well-formed and/or valid.

Recommended by W3c at Feb. 1998.

Page 7: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 7

What is the status of XML?

embraced by all of the leaders in the computer industry. many vertical industries are embracing XML for its ability

to expedite the availability of their domain-specific information for internal and external use.

IBM, Microsoft, Sun, Oracle, HP, …

There are many W3C-proposed extensions to XML. Most use the XML language, which minimizes the

differences in syntax that must be learned.

Page 8: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 8

Sun’s java API support for XML (skipped)

JAXP (java API for XML Parsing; 1.0; 1.1) enables Java applications to read, manipulate, and generate XML

documents. 1.1 supports (DOM) Level 2.

JAXM (Java API for XML messaging) enables packaging, routing, and transport of XML and other

messages using HTTP, SMTP, and FTP, useful to programmers building robust, secure e-commerce

applications.

JAXB (Java API for XML Data Binding ) intended to help develop and maintain XML-enabled applications with

a minimum of effort. JAXB maps XML documents to Java objects. include a compiler automatically generating Java classes from XML

schemas.

Page 9: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 9

Why do we need XML ?

Old three-tier WWW architecture :Major information flows (for human information retri

eval):

(human) -->client browser --(http)--> webServer

--> CGI(query) --> databases -->wrap result into html or other MIME formats --(http) ---> browser ---(data rendering) --> human

major interactions and interchanged data formats: application type: information retrieval Man ---(html/MIME)--- machine(browser+web server) web server ----(machine dependent)--- backend system

(databases)

Page 10: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 10

IE5,6

NETSCAPE

...

...

IISapache

client browser

web server

web server

web server

client browser

client browser

the internet

databasesfile

system databasesfile

system

databasesfile

system

queryresult tables

query(post,get)http

html/textgif/jpegvideo/audio

Page 11: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 11

The other major WWW applications: business applications

Page 12: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 12

Additional Interactions for WWW business applications

New application type : web serviceadditional interactions

backend business system <---> webserver <--> webserver <---> backend business system

Problem: Too many data format exist among the systems and web servers understanding all kinds of data formats are hard to implement.

Solution: define a universal or a small set of universal data formats and require all systems to transmit data using such formats.

but the existing HTML + MIME formats not enough ? NO!! HTML, while amendable to human via browsers, is n

ot easy for machine to understand/retrieve data.

Page 13: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 13

Advantages of XML over HTML

XML can define your own tags.XML tags describe the content, rather than the pres

entation of that content easier for content search. easier for page development (separating content from vie

w) easy for devices to render the contents depending on its

environments (single model/multiple views)Notes for the next figure:

searches can be applied to XML data more easily, and the result can be rendered differently, depending on the destination device.

the XML processor can exist on the server, the client, or both.

Page 14: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 14

work done by the XML processor in response to a client request:1. collect data from related data sources2. merge sources into a unifying content3. rendering data depending on the client’s environment.

Page 15: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 15

Business area benefited from XML use

e-commerce there are now many specific XML languages to describe

orders, transactions, inventory, and billing. These open XML languages will allow manufacturers, reta

ilers, and consumers, even banking and accounting systems to share the same data.

Meaningful searches, platform independence If Web data (contents) is encoded in XML, customers can

find your product or service, and purchase it, without regard for the used (server/client) platforms.

Data accessibility XML schema allow XML documents to encod

e the datatype information and relationships in existing databases.

Page 16: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 16

Business area benefited from XML use

XML extensions such as XQuery can be used to specify queries within XML.

Database information can be immediately accessible as XML on corporate intranets or the Web. XML views provided now by most venders

Page 17: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 17

Business area benefited from XML use

Application simplification Today's applications suffer from file-format bloat. XML's open and extensible nature allows us to represent

all of the functionality of different existing formats in one XML domain-specific grammar.

enable the sharing of data over the Internet.Since the actual data but not its presentation is encoded, it may

be presented on any output device from the PC with a browser to the cell-phone and small PDA.

Page 18: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 18

Comparison of XML and Other formats

HTMLText-based non-markup formats

.c .cpp .java .ini …

Binary formats .dll .exe .o .swf .class .png .jpeg …

Page 19: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 19

Advantage of XML over text formats

Ex: JavaML v.s Java; CppML v.s Cpp XMI v.s rational’s proprietary format web.xml v.s ***.ini (for configuration)

advantage: structure explicitly represented in the XML format. (free and) standard tools (and API) exists for quick parsing of the XM

L format. => front-end processing avoided/reduced

disadvantage: too verbose. for storage and transmission.

can be overcome by compression

for human generation; (not a problem for machine generation) require smarter editor

for human reading/comprehension:a real problem!!

Page 20: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 20

Advantage of XML over binary formats

Example: classML v.s .clss file format. swlml v.s swf (Flash file format)

advantage: readable; editable (free and) open software and APIs available

disadvantage: take longer time to parse.

The trend: one data model/ multi representation formats + converters among the formats.

Page 21: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 21

Core specifications for XML

XML 1.0XML NamespaceXML Path language (XPath)XML Stylesheet Langugae (XSL)

XSL Transformation language (XSLT) XSL formating Objects (XSLFO)

XML Linking language (XLink)XML Pointer Langugae (XPointer)XML schemas (; RelaxNG)XHTMLXML signatures/canonicalizationXML protocolsXMLFormXQuery (XML language for Querying XML Documents)

Page 22: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 22

Core Specifications for XML

XML document type definition (DTD) : a utility used to define the formats a

nd contents of valid XML documents. a specification to define what kinds of texts are well-formed XML doc

ument

XML namespace Define a mechanism to avoid collision of elements and/or attribute na

mes in documents using multiple sets of DTDs.

Xlink Define the mechanism for linking to web resources from an XML doc

ument.

Xpointer Define a mechanism for linking to inside an XML document.

XPath Define a mechanism to refer to part of an XML document

Page 23: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 23

XSL ( XML Stylesheet Language)

a language for expressing stylesheets. consists of two parts:

XSLT : a language (in XML format) used to describe how to transform an XML document into one in XML or non-XML format.

XSLFO: an XML vocabulary for specifying formatting semantics.

An XSL stylesheet specifies the presentation of a class of XML documents by describing how an instance of the class is transformed into an XML document that uses the formatting vocabulary.

Page 24: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 24

Page 25: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 25

XML Schema A planned replacement of DTD. used to define the structures and formats of various mess

ages encoded in XML format.

consists of three documents: Part 0: a primer

an easy-to-understand introcuction

Part 2: Datatypes define tens of frequently used bulit-in datatypes

Part 3: structures specifies the XML Schema definition language, offers facilities f

or describing the structure and constraining the contents of XML documents

Page 26: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 26

API for XML documents

DOM (level 1 & 2) : Document Object Model Tree-based XML API language independent

SAX (version 1 & 2) : Simple API for XML Document, Event-based XML API

JDOM, dom4j (XML APIs for Java) DOM for Java Tree-based, simpler version of DOM easier to use than DOM, suitable for Java only

Page 27: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 27

How can XML be used ?

XML was designed to store, carry and exchange data. It was not designed to display data.

XML is used to Exchange Data With XML, data can be exchanged between incompatible

systems. XML and B2B : With XML, financial information can be

exchanged over the Internet.

XML can be used to Share Data With XML, plain text files can be used to share data.

XML can be used to Store Data With XML, plain text files can be used to store data.

XML can be used to Create new Languages XML is the mother of WAP and WML.

Page 28: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 28

XML can make your Data more Useful With XML, your data is available to more users.

For sensible developers All sensible developers should have all their

future applications exchange data in XML.

Page 29: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 29

What can we do about XML

XML document design/application development XMLize legacy system data/database

一般企業 : 之 人事 庫存 客戶 產品 產品使用手冊 公文 醫院 學校 政府機關 ( 戶政 地政 稅捐 ...) : 病例 藥品 課程 戶籍 地籍 稅務

Design standard XML format for various domains order, transaction, billing, product for business domain mathematical formula, chemical formula in science Graph/graphics markup language ; Others:

XML processing tools: XML parser; XML editors; XML-existing format converter XML2HTML; DTD2DCD ; DCDeditor Various Domain-specific XML rendering tools

graphical XML --> Graphic DTD manager, schema tools, soap processor, web service tools/IDE/sys

temXML-enabled services/applications:

make your application software capable of serving request from internet (without special prerequisite) and requesting other internet on-line service.

Page 30: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 30

XML information

Java Sun’s java site: (http://java.sun.com/) The java tutorial (http://java.sun.com/docs/books/tutorial/)

is a nice book to begin with.

Information sources on XML: W3C site: http://www.w3.org/TR/ SGML/XML home page: http://www.oasis-open.org/cover/ XML com: http://www.xml.com/ XML university: http://www.xmlu.com/ XML page of leading computer companies

Microsoft: http://www.microsoft.com/xml/ IBM: http://www.software.com/xml/ sun: ....

See the course page for more.

Page 31: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 31

XML applications

XML as an alternative representation format (SVG) Scalar Vector Graph : for vector graph (MathML) : for mathematical expressions SMIL (Synchronized Multimedium Integration language): Resource Description Framework (RDF) : an XML language for descri

bing web resources and their relationship CML (Chemical Markup Language) : for chemical molecule JCML : XML format for java bytecodes (object code) JavaML : for java programs Ant : a replacement of make for java OOML : a OO PL in XML UIML : user interface Markup language WAP WML (Wireless Markup Langugae)

Page 32: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 32

A partial list of XML applications and industry initiatives W3C Specifications Documentation Text Encoding Initiative (TEI) XCES: Corpus Encoding Standard for XML Encoding and Markup for Texts of the Ancient Near East Electronic Text Corpus of Sumerian Literature (ETCSL) Perseus Project Channel Definition Format, CDF (Based on XML) RDF Rich Site Summary (RSS) Open Content Syndication (OCS) Web Modeling Language (WebML) Portable Site Information (PSI) XHTML and 'XML-Based' HTML Modules W3C Document Object Model (DOM), Level 1 Specification Web Collections using XML Meta Content Framework Using XML (MCF) XML-Data Namespaces in XML Resource Description Framework (RDF) Ontology Interchange Language (OIL) The Australia New Zealand Land Information Council (ANZLIC) - Metadata Alexandria Digital Library Project ATLA Serials Project (ATLAS)

Page 33: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 33

XML in law

BiblioML - XML for UNIMARC Bibliographic Records Medlane XMLMARC Experiment - MARC to XML e-Government Interoperability Framework (e-GIF) US Federal CIO Council XML Working Group XML Metadata Interchange Format (XMI) - Object Management Group (OMG) OMG Common Warehouse Metadata Interchange (CWMI) Specification Object Management Group XML/Value RFP MDC Open Information Model (OIM) Dublin Core Metadata Initiative (DCMI) Open Archives Metadata Set (OAMS) Publishing Requirements for Industry Standard Metadata (PRISM) Platform for Internet Content Selection (PICS) XML and Petri Nets Outline Processor Markup Language (OPML) ParlML: A Common Vocabulary for Parliamentary Language Legal XML Working Group COSCA/NACM JTC XML Court Filing Project New Mexico District Court XML Interface (XCI)

Page 34: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 34

XML and multimedia

Synchronized Multimedia Integration Language (SMIL) Multimodal Presentation Markup Language (MPML) Moving Picture Experts Group: MPEG-7 Standard DIG35: Metadata Standard for Digital Images W3C Scalable Vector Graphics (SVG) Precision Graphics Markup Language (PGML) Vector Markup Language (VML) Image Markup Language (IML) VRML (Virtual Reality Modeling Language) and X3D Extensible Graph Markup and Modeling Language (XGMML) Structured Graph Format (SGF) Graph Exchange Language (GXL) Petri Net Markup Language (PNML)

Page 35: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 35

XML in chemistry and biochemistry

Georgia State University Electronic Court Filing Project Web Standards Project (WSP) Open Software Description Format (OSD) XLF (Extensible Log Format) Initiative ALURe (Aggregation and Logging of User Requests) XML Specification Apache XML Project WAP Wireless Markup Language Specification The SyncML Initiative Materials Property Data Markup Language (MatML) Measurement Units Markup Language XML-Based 'eStandard' for the Chemical Industry Chemical Markup Language Molecular Dynamics [Markup] Language (MoDL) StarDOM - Transforming Scientific Data into XML Bioinformatic Sequence Markup Language (BSML) BIOpolymer Markup Language (BIOML) CellML Gene Expression Markup Language (GEML) Genome Annotation Markup Elements (GAME)

Page 36: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 36

XML and Finance

Microarray Markup Language (MAML) XML for Multiple Sequence Alignments (MSAML) Systems Biology Markup Language (SBML) OMG Gene Expression RFP Taxonomic Markup Language XDELTA: XML Format for Taxonomic Information Virtual Hyperglossary (VHG) Weather Observation Definition Format (OMF) Open Philanthropy Exchange (OPX) Open Financial Exchange (OFX/OFE) Interactive Financial Exchange (IFX) FinXML - 'The Digital Language for Capital Markets' Investment Research Markup Language (IRML) Extensible Financial Reporting Markup Language (XFRML) Extensible Business Reporting Language (XBRL) XMLPay Specification Trading Partner Agreement Markup Language (tpaML) Internet Open Trading Protocol (IOTP) Financial Products Markup Language (FpML)

Page 37: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 37

XML messaging ( or XML Protocols)

XML Mail Transport Protocol (XMTP) for XML SMTP and MIME Representation HTML Threading - Use of HTML in Email XML Messaging (IETF) Jabber XML Protocol XML Messaging Specification (XMSG) M Project: Java XML-Based Messaging System HTTP Distribution and Replication Protocol (DRP) Information and Content Exchange (ICE)

Page 38: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 38

FAML DTD for Financial Research Documents Mortgage Bankers Association of America MISMO Standard Digital Property Rights Language (DPRL) Extensible Rights Markup Language (XrML) Open Digital Rights Language (ODRL) Research Information Exchange Markup Language (RIXML) Data Link for Intermediaries Markup Language (daliML) XML-MP: XML Mortgage Partners Framework EcoKnowMICS ML Electronic Book Exchange (EBX) Working Group FIXML - A Markup Language for

the FIX Application Message Layer Bank Internet Payment System (BIPS) smartX ['SmartCard'] Markup Language (SML)

Page 39: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 39

Secure XML

XML and Encryption XML Digital Signature (Signed XML - IETF/W3C) XML Key Management Specification (XKMS) Security Services Markup Language (S2ML) AuthXML Standard for Web Security Digital Signatures for Internet Open Trading Protocol (IOTP) XML Encoding of SPKI Certificates Digital Receipt Infrastructure Initiative Digest Values for DOM (DOMHASH) Signed Document Markup Language (SDML)

Page 40: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 40

Real Estate Transaction Markup Language (RETML) OpenMLS and RELML (Real Estate Listing Markup Language) Data Consortium (Real Estate Standards) Comprehensive Real Estate Transaction Markup Language (CRTML) ACORD - XML for the Insurance Industry iLingo XML Schemas for Insurance Customer Profile Exchange (CPEX) Working Group Customer Support Consortium XML for the Automotive Industry - SAE J2008 Spacecraft Markup Language (SML) XML.ORG - The XML Industry Portal X-ACT - XML Active Content Technologies Council Electronic Business XML Initiative (ebXML) BASDA eBIS-XML Portal Markup Language (PML) EDGARspace Portal DII Common Operating Environment (COE) XML Registry StarOffice XML File Format Open eBook Initiative ONIX International XML DTD NISO Digital Talking Books (DTB)

Page 41: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 41

OpenMath Standard OMDoc: A Standard for Mathematical Documents Mathematical Markup Language Re-Useable Data Language (RDL)" OpenTag Markup Metadata - PICS MIX - Mediation of Information Using XML CDIF XML-Based Transfer Format Covad xLink API (XML-Based DSL Provisionin

g) WebBroker: Distributed Object Communication on the Web Web Interface Definition Language (WIDL) Global Engineering Networking Initiative (GEN) XML/EDI - Electronic Data Interchange XML/EDI Repository Working Group

Page 42: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 42

Global Uniform Interoperable Data Exchange (GUIDE) BizCodes Initiative Universal Data Element Framework (UDEF) European XML/EDI Workshop EEMA EDI/EC Work Group - XML/EDI ANSI ASC X12/XML and DISA OpenTravel Alliance (OTA) Hospitality Industry Technology Integration Standards (HITIS) Project Open Catalog Protocol (OCP) eCatalog XML (eCX) vCard Electronic Business Card Customer Identity / Name and Address Markup Language (CIML, NAML) AND Global Address XML Definition Historical Event Markup and Linking iCalendar XML DTD

Page 43: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 43

EC FrameWorks

CommerceNet Industry Initiative eCo Interoperability Framework Specification BizTalk Framework eCo Framework Project and Working Group Commerce XML (cXML) SMBXML: An Open Standard for Small to Medium Sized Businesses RosettaNet

Page 44: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 44

XML Encoded Form Values Capability Card: An Attribute Certificate in XML Telecommunications Interchange Markup (TIM, TCIF/IPI) aecXML Working Group - Architecture, Engineering and Construction Building Construction Extensible Markup Language (bcXML) MasterBuilder Construction Management and Accounting Green Building XML (gbXML) Product Data Markup Language (PDML) Product Definition Exchange (PDX) Electronic Component Information Exchange (ECIX) and Pinnacles Component Information

Standard (PCIS) ECIX QuickData Specifications ECIX Component Information Dictionary Standard (CIDS) ECIX Timing Diagram Markup Language (TDML) XML and Electronic Design Automation (EDA) Encoded Archival Description (EAD) UML eXchange Format (UXF) XML Data Binding Specification Translation Memory eXchange (TMX) P3P Specification: Platform for Privacy Preferences Extensible Name Service (XNS) Dialogue Moves Markup Language (DMML)

Page 45: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 45

Scripting News in XML InterX.org Initiative Document Encoding and Structuring Specification for Electronic Recipe Transfer (DESSE

RT) NuDoc Technology Coins: Tightly Coupled JavaBeans and XML Elements DMTF Common Information Model (CIM) Universal Plug and Play Forum XML Transition Network Definition (XTND) Process Interchange Format XML (PIF-XML) (XML) Topic Maps DARPA Agent Mark Up Language (DAML) Rule Markup Language (RuleML) Relational-Functional Markup Language (RFML) Ontology and Conceptual Knowledge Markup Languages Information Flow Framework Language (IFF) Simple HTML Ontology Extensions (SHOE) XOL - XML-Based Ontology Exchange Language Description Logics Markup Language (DLML) Case Based Markup Language (CBML) Artificial Intelligence Markup Language (AIML) Physics Markup Language (PhysicsML)

Page 46: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 46

Procedural Markup Language (PML) QAML - The Q&A Markup Language LACITO Projet Archivage de données linguistiques sonores et textuelles [Linguistic Data

Archiving Project] Geography Markup Language (GML) LandXML Navigation Markup Language (NVML) Extensible Data Format (XDF) Gemini Observatory Project NASA Goddard Astronomical Data Center (ADC) 'Scientific Dataset' XML Extensible Scientific Interchange Language (XSIL) Object Oriented Data Technology (OODT) and XML Astronomical Markup Language Astronomical Instrument Markup Language (AIML) GedML: [GEDCOM] Genealogical Data in XML adXML.org: XML for Advertising Newspaper Association of America (NAA) - Standard for Classified Advertising Data News Industry Text Format (NITF) XMLNews: XMLNews-Story and XMLNews-Meta NewsML and IPTC2000 News Markup Language (NML) Notes Flat File Format (NFF)

Page 47: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 47

Java Help API Cold Fusion Markup Language (CFML) Document Content Description for XML (DCD) XSchema Document Definition Markup Language (DDML) Character Mapping Markup Language (CharMapML) WEBDAV (IETF 'Extensions for Distributed Authoring and Versioning on the World Wide

Web') DAV Searching and Locating (DASL) Graphic Communications Association - GCA 'Paper' DTD DocBook XML DTD Apache Cocoon JavaDoc Documentation in XML JDox: XML Format for Sun Javadoc XML for Publishers and Printers (XPP) Job Definition Format (JDF) Printing Industry Markup Language (PrintML) PML: Markup Language for Paper and Printing PrintTalk Consortium printcafe eProduction eCommerce eXchange (PCX) IEEE LTSC XML Ad Hoc Group Universal Learning Format Technical Specification

Page 48: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 48

Educom Instructional Management Systems Project (IMS) Metadata Specification Learning Material Markup Language (LMML) Tutorial Markup Language (TML) International Development Markup Language (IDML) Call Processing Language (CPL) Call Policy Markup Language (CPML) VoiceXML Forum (Voice Extensible Markup Language Forum) VoxML Markup Language Telephony Markup Language (TML) DARPA Communicator Project and XML Log Standard Multilevel Annotation, Tools Engineering (MATE) Computing Environment for Linguistic, Literary, and Anthropological Research (CELLAR) Architecture and Tools for Linguistic Analysis Systems (ATLAS) TalkBank and the Codon XML-Based Annotation Framework ACE Pilot Format DTDs Transcriber - Speech Segmentation and Annotation DTD Natural Language Semantics Markup Language Extensible Telephony Markup Language (XTML) SABLE: A Standard for Text-to-Speech Synthesis Markup Speech Synthesis Markup Language Specification for the Speech Interface Framework Java Speech Markup Language (JSML/JSpeech) SpeechML

Page 49: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 49

TalkML Project Management XML Schema XML for Workflow Management [NIST] SWAP - Simple Workflow Access Protocol XML-Based Workflow [Process Management] Standard: Wf-XML Exchangeable Routing Language (XRL) Architecture Description Markup Language (ADML) Theological Markup Language (ThML) LitML: A Liturgical Markup Language XML-F ('XML for FAX') XML and Forms XHTML-FML: Forms Markup Language Extensible Forms Description Language (XFDL) XML Forms Architecture (XFA)Electronic Form System (EFS) Broadcast Hypertext Markup Language (BHTML) IEEE Standard DTD Open Settlement Protocol (OSP) - ETSI/TIPHON Directory Services Markup Language (DSML) DIF Directory Interoperability Proposal XML DTD for ACAP - ACAP Data Interchange Format WDDX - Web Distributed Data Exchange XIOP - XML Corba Environment-Specific Inter-ORB Protocol

Page 50: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 50

XML-RPC Blocks eXtensible eXchange Protocol Framework (BEEP) Layered Object Transport Protocol (LOTP) XML for Exchange of Structure and Identification of Management Information (SMI) WorldOS Business Process Modeling Language (BPML) Business Rules Markup Language (BRML) Common Business Library (CBL) Universal Commerce Language and Protocol (UCLP) VISA XML Invoice Specification First Retail Mark-up Language Open Applications Group - OAGIS Schema for Object-oriented XML (SOX) XMLTP.Org - XML Transfer Protocol The XML Bookmark Exchange Language (XBEL) Simple Object Definition Language (SODL) and XMOP Service Simple Object Access Protocol (SOAP) Universal Description, Discovery, and Integration (UDDI) Web Services Description Language (WSDL) Extensible Provisioning Protocol (EPP) Transaction Authority Markup Language (XAML) XML Encoding Rules for ASN.1 (XER)

Page 51: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 51

Object-Oriented Programing Meta-Language (OOPML) XML and Music FlowML: A Format for Virtual Orchestras Clinical Data Interchange Standards Consortium National Library of Medicine (NLM) XML Data Formats ISIS European XML/EDI Healthcare Pilot Project (XMLEPR) Open Healthcare Group 'XChart' DocScope: Open Source XML Healthcare Project Health Level Seven XML Patient Record Architecture ASTM XML Document Type Definitions (DTDs) for Health Care The CISTERN Project - Standard XML Templates for Healthcare Template Definition Language (TDL) Human Resource Management Markup Language (HRMML) HR-XML Consortium XML-HR Initiative - Human Resources Rosetta Group XML Résumé Library ECMData - Electronic Component Manufacturer Data Sheet Inventory Specification Bean Markup Language (BML) The Koala Bean Markup Language (KBML) Jigsaw XML Format (JigXML) Chinese XML Now! MOS-X (Media Object Server - XML)

Page 52: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 52

FLBC (Formal Language for Business Communication) and KQML ISO 12083 XML DTDs Electronic Thesis and Dissertation Markup Language (ETD-ML) Extensible User Interface Language (XUL) The Extensible Bindings Language (XBL) User Interface Markup Language (UIML) Process Specification Language (PSL) and XML Steel Markup Language (SML) Energy Trading Standards Group (ETSG) Petrotechnical Open Software Corporation (POSC) XML Related Projects PetroXML Initiative Partner Interface Process for Energy (PIPE) Marine Trading Markup Language (MTML) Navy CALS Initiatives XML eFirst XML for Scholarly Articles XML DTD for Phone Books Using XML for RFCs Schools Interoperability Framework (SIF) Guideline XML (gXML) Extensible Protocol XML Belief Network File Format (Bayesian Networks)

Page 53: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 53

Predictive Model Markup Language (PMML) Data Documentation Initiative: A Project of the Social Science Community XML and 'The Semantic Web' XML and Attribute Grammars XML and Databases SODA2 - An XML Semistructured Database System RAX - Record API for XML XML and CORBA Chess Markup Language (ChessML) Mind Reading Markup Language (MRML)

Page 54: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 54

XML in EDA (Electric Design Automation)

Page 55: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 55

A sketch of the XML Syntax

XML is a simple data format that balances the needs of people to read/write data with the needs of machines to read/write data.

-- Dan Connolly, W3C

Page 56: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 56

A sketch of XML Syntax

An example XML document:<?xml version="1.0"?> <note> <to>Cheng</to> <from>Chen</from> <heading>Reminder</heading> <body>Don't forget me this

weekend!</body> </note> Notes:1. The XML declaration should always be

included. 2. <note>…</root> is the root element which

has 4 children.

Page 57: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 57

<!– the structure of the document element -->

<department>

<employee id="J.D">

<name>John Doe</name>

</employee>

<employee id="A.M“ id-no =“L12345678” >

<name>Alice Miller</name>

<url href="http://www.trl.jp.ibm.com/~amiller/"/>

</employee>

</department>

Page 58: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 58

<!– the structure of the document element -->

The root or document element

Element type (or name)

child element

Attributes

attribute valueattribute name

<department> start tag

<employee id="J.D">

<name>John Doe</name>

</employee>

<employee id="A.M“ id-no =“L12345678” >

<name>Alice Miller</name>

<url href="http://www.trl.jp.ibm.com/~amiller/"/>

</employee>

</department> end-tag

Page 59: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 59

All XML elements must have a closing tag

In HTML some elements do not have to have a closing tag. The following code is legal in HTML:

<p>This is a paragraph <p>This is another paragraph

In XML all elements must have a closing tag like this:

<p>This is a paragraph</p> <p>This is another paragraph</p>

Page 60: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 60

XML tags are case sensitive

XML tags are case sensitive. The tag <Letter> is different from the tag

<letter>.Opening and closing tags must be written

with the same case: <Message>This is

incorrect</message> <message>This is

correct</message> 

Page 61: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 61

All XML elements must be properly nested

In HTML some elements can be improperly nested within each other like this:

<b><i>This text is bold and italic</b></i>

In XML all elements must be properly nested within each other like this

<b><i>This text is bold and italic</i></b>

Page 62: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 62

All XML documents must have a root tag

All XML documents must contain a single tag pair to define the root element. All other elements must be nested within the root element. All elements can have sub (children) elements. Sub elements must be in pairs and correctly nested within their parent element:

<root> <child> <subchild> </subchild>

</child> </root>

Page 63: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 63

Attribute values must always be quoted

XML elements can have attributes in name/value pairs just like in HTML. In XML the attribute value must always be quoted. Study the two XML documents below. The first one is incorrect, the second is correct:

<?xml version="1.0"?> <note date= 12/11/99> <to>Tove</to><from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note><?xml version="1.0"?> <note date="12/11/99"> <to>Tove</to><from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

Page 64: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 64

XML Attributes

normally used to describe XML elements, orto provide additional information about elements. From HTML you can remember this construct:

<IMG SRC="computer.gif">In this HTML example:

SRC is an attribute to the IMG element. he SRC attribute provides additional information about th

e element.

Page 65: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 65

XML Attributes

Attributes are always contained within the start tag of an element. Here are some examples:

HTML examples: <img src="computer.gif"> <a href="demo.asp">

XML examples: <file type="gif"> <person id="3344">

Attributes are usually used to provide information that is not a part of the content of the XML document. I.e. Often attribute data is more important to the XML parser than to the r

eader. in the example above, the person id is a counter value that is irreleva

nt to the reader, but important to software that wants to manipulate the person element. 

Page 66: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 66

Use of Elements vs. Attributes

Examples:Using an Attribute for sex: <person sex="female"> <firstname>Anna</firstname> <lastname>Smith</lastname> </person> Using an Element for sex: <person> <sex>female</sex> <firstname>Anna</firstname> <lastname>Smith</lastname> </person>

Page 67: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 67

XML Validation

Well-Formed XML documentsA Well-Formed XML document is a document that c

onforms to the XML syntax rules that we have described .

The following is a Well-Formed XML document:

<?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

Page 68: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 68

Valid XML documents

A Valid XML document is a Well-Formed XML document which conforms to the rules of a Document Type Definition (DTD).

The following is the same document as above but with an added reference to a DTD:

<?xml version="1.0"?> <!DOCTYPE note SYSTEM "InternalNote.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

Page 69: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 69

DTD - Table of Contents

Introduction to DTD An introduction to the XML Document Type Definition.

DTD - XML Building Blocks What XML building blocks are defined in a DTD. DTD Elements How to define the elements of an XML document using DTD. DTD Attributes How to define the legal attributes of XML elements using

DTD. DTD Entities How to define XML entities using DTD. DTD Validation How to test for DTD errors while loading XML documents. DTD Examples Some DTD examples.

Page 70: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 70

Introduction to DTD

The purpose of a DTD is to define the legal building blocks of an XML document.

It defines the document structure with a list of legal elements.

A DTD can be declared inline in your XML document, or as an external reference.

Page 71: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 71

Internal DTD

This is an XML document with a Document Type Definition: (Open it in IE5, and select view source)

<?xml version="1.0"?> <!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> <note> <to>Tove</to> <from>Jani</from> <heading>Remind

er</heading> <body>Don't forget me this weekend!</body> </note>

The DTD is interpreted like this:!ELEMENT note (in line 2) defines the element "note" as having four elements: "to,from,heading,body". and so on.....

Page 72: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 72

External DTD

This is the same XML document with an external DTD:  (Open it in IE5, and select view source)

<?xml version="1.0"?><!DOCTYPE note SYSTEM "note.dtd"><note> <to>Tove</to> <from>Jani</from><heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

Page 73: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 73

note.dtd

This is a copy of the file "note.dtd" containing the Document Type Definition:

<?xml version="1.0"?> <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)>

Page 74: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 74

Why use a DTD?

XML provides an application independent way of sharing data.

With a DTD, independent groups of people can agree to use a common DTD for interchanging data.

Your application can use a standard DTD to verify that data that you receive from the outside world is valid. You can also use a DTD to verify your own data.

A lot of forums are emerging to define standard DTDs for almost everything in the areas of data exchange. Take a look at: CommerceNet's XML exchange and http://www.schema.net.

Page 75: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 75

DTD - XML building blocks

The building blocks of XML documentsXML documents (and HTML documents) are made

up by the following building blocks: Elements, Tags, Attributes, Entities, PCDATA, and CDATA

This is a brief explanation of each of the building blocks:

Page 76: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 76

Elements

Elements are the main building blocks of both XML and HTML documents.

Examples of HTML elements are "body" and "table". Examples of XML elements could be "note" and "m

essage".Elements can contain text, other elements, or be em

pty.Examples of empty HTML elements are "hr", "br" an

d "img".

Page 77: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 77

Tags

Tags are used to markup elements.A starting tag like <element_name> mark up the beg

inning of an element, and an ending tag like </element_name>  mark up the en

d of  an element.Examples:

A body element:

<body> body text in between</body>.A message element:

<message> some message in between</message>

Page 78: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 78

Attributes

Attributes provide extra information about elements.Attributes are placed inside the start tag of an elem

ent.Attributes come in name/value pairs. The following "img" element has an additional infor

mation about a source file:

<img src="computer.gif" />Notes:

The name of the element is "img". The name of the attribute is "src". The value of the attribute is "computer.gif". Since the element itself is empty it is closed by a " /".

Page 79: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 79

PCDATA

PCDATA means parsed character data.Think of character data as the text found between

the start tag and the end tag of an XML element.PCDATA is text that will be parsed by a parser. Tags inside the text will be treated as markup and

entities will be expanded. 

Page 80: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 80

CDATA

CDATA also means character data.CDATA is text that will NOT be parsed by a parser. Tags inside the text will NOT be treated as markup

and entities will not be expanded.

Page 81: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 81

Entities

Entities as variables used to define common text. Entity references are references to entities.Most of you will known the HTML entity reference: "&nbsp;" 

that is used to insert an extra space in an HTML document. Entities are expanded when a document is parsed by an XML

parser.The following entities are predefined in XML:Entity References Character

&lt; <

&gt; >

&amp; &

&quot; "

&apos; '

Page 82: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 82

DTD - Elements

Declaring an ElementIn the DTD, XML elements are declared with an

element declaration. An element declaration has the following syntax:

<!ELEMENT element-name (element-content)>

Page 83: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 83

Empty elements

Empty elements are declared with the keyword EMPTY inside the parentheses:

<!ELEMENT element-name (EMPTY)>example:

<!ELEMENT img (EMPTY)>

Page 84: SP2001 Transparency No. 1 XML Technologies and Applications Cheng-Chia Chen Feb. 2002

XML Introduction

Transparency No. 84

Elements with data

Elements with data are declared with the data type inside parentheses:<!ELEMENT element-name (#CDATA)> or <!ELEMENT element-name (#PCDATA)> or<!ELEMENT element-name (ANY)>

Example:<!ELEMENT note (#PCDATA)>1. #CDATA means the element contains character

data that is not supposed to be parsed by a parser.

2. #PCDATA means that the element contains data that IS going to be parsed by a parser.

3. The keyword ANY declares an element with any content.

4. If a #PCDATA section contains elements, these elements must also be declared.