Location: Speaker's Session, Hong Kong Computer Society XML Specialist Group, Hong Kong Polytechnic University /
Event Date: Aug 23, 2003 /
Organization: Hong Kong Computer Society
The Ultimate Guide to Choosing WordPress Pros and Cons
The Mythical XML
1. The Mythical XML
Mr. Thomas Lee
Center for E-Commerce Infrastructure Development
(CECID), The University of Hong Kong
HK Computer Society XML Specialist Group
Speaker’s Session
26 August 2003, HK Polytechnic University
2. Agenda
XML Basis
Web Services
XML Development in HK
Demo
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 2
4. True or False?
XML = Extensible Markup Language
XML is an extension of HTML
– XML is going to replace HTML for Web
browsing
Tags are not predefined in XML
– You must define your own tags
XML specifies data semantics
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 4
5. Background of XML
eXtensible Markup Language
XML 1.0 became a W3C Recommendation in
1998
F.O.X (Father of XML) - Jon Bosak
– a SUN architect, who led a group to create XML
Over 20 XML-related specs at W3C in 2003
Over 200 XML application standards for
different industries registered at XML.org
– Finance, healthcare, e-government, mathematic,
telecom…
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 5
6. What is XML?
A markup language for documents containing structured
information
– i.e. a data format for structurally delimiting text data with tags
For computer-to-computer communication
HTML XML
Encode content and Encode structure + content
presentation (no presentation)
Tags are already defined for Tags are to be defined by
rendering the content on different applications for
browsers (one application only) processing the content
Semantics has already been Semantics is not defined in
defined in HTML spec XML spec
XML is not going to replace HTML
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 6
11. XSLT
XML Stylesheet Language Transformation
A scripting language to transform a XML document
to different document forms
– another XML form, HTML, text, etc.
Can present XML data in different rendering
languages, e.g. HTML, WML
– separation of content and presentation
Can translate to a different XML form (conforming
to a different XML schema)
– interoperability between different applications, e.g.
vendor products
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 11
14. XSLT Example (3)
<xsl:template match="Weather">
<tr>
<td>
<xsl:apply-templates select="@date"/>
</td>
<td>
<xsl:apply-templates select="text()"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 14
15. Schema Language
A schema language is used to validate the XML data whether
it is in valid form for a specific application
– the tag set
– the structure in which the tags can be placed
– the format of the values marked-up by tags and attributes values
Data Type Definition (DTD) and W3C XML Schema
To define an XML application standard
– e.g. XBRL (XML Business Reporting Language)
Not sufficient define semantics
– semantics is defined in a supplementary vocabulary or
specification
Not designed to program application logic
– e.g. cannot convert temperature between degrees Celsius and
Fahrenheit
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 15
17. True or False (Answers)
XML = Extensible Markup Language
XML is an extension of HTML
– XML is going to replace HTML for Web
browsing
Tags are not predefined in XML
– You must define your own tags
XML specifies data semantics
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 17
20. How to Automatically Obtain
Weather Info from HKO?
Now:
– poll HKO web pages
– “try” to decode the text contained within
(based on the current web page layout)
– 300+ have registered web sites, mass media,
telecom operators using this method
– problem: a slight change to layout or data
format would cause problems to these users
Better solution:
– Use Web Services
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 20
21. What is Web Service?
Remote procedure call (distributed
computing) on the Internet using XML
Exposes functionality through a standard
protocol
Describes the interfaces in enough detail
to for building client applications to talk to
them
Registers the services so that potential
users can find them easily
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 21
22. SOAP
Simple Object Access Protocol
Uses XML to package input and output data on
making a remote procedure call (RPC) on the
Internet
Uses Internet protocols for data transport, e.g.
HTTP, SMTP
– Firewall friendly
Platform independent
– .Net and Java programs can talk with each other in SOAP
http://www.w3c.org
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 22
24. SOAP Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Date: Tue, 26 Aug 2003 02:25:37 GMT
Server: Apache Coyote/1.0
Connection: close
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getWarningResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://model.weatherwarning.webservice.hko.cecid.hku.hk">
<return xsi:type="xsd:string">強烈季候風信號</return>
</ns1:getWarningResponse>
</soapenv:Body>
</soapenv:Envelope>
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 24
25. WSDL
Web Services Description Language
Specifies the data types and structures (in XML
Schema) of input and output data for a SOAP call
Specifies other transport parameters, e.g. protocol,
URL end-point, etc.
Tells the clients how to make a SOAP call to use a
specific Web Service
– similar to Interface definition language (IDL) for RPC
http://www.w3c.org
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 25
26. UDDI
Universal Description, Discovery and Integration
A registry to register, publish, find Web Services
– white pages, or basic identification: name, address, and
key points of contact
– yellow pages, or classification by a standard index of
business and industries
– green pages, or technical capabilities and services related
to the conduct of electronic business
Similar to a portal for system clients
http://www.uddi.org
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 26
27. ebXML
E-business XML
Co-developed by UN/CEFACT and OASIS
XML-based document exchange architecture to
perform Electronic Data Interchange (EDI) on the
Internet
Provides reliable and secure document exchange
on the Internet
Supports business process specification for
system execution
Widely adopted in Asia and Europe
– HK is an ebXML forerunner
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 27
29. eProcurement Case
MTRC purchases office supplies from Saggio on
SaggioDirect.com
Past: plentiful of delivery notes, invoices, monthly
statements were sent in paper and reconciled
manually
Present: XML documents are transferred on the
Internet using ebXML
– automatic reconciliation
– save costs and trees
– procurement data ready for analysis and planning
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 29
30. eProcurement with ebXML
Delivery goods Saggio Logistics
MTRC
Users
SaggioDirect System
Workstations
MTRC Intranet System Web
Internet Server
Intranet
Server
XML document
Hermes
Extract data XML document
from XML
Hermes document
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 30
31. eLogistics Case
Shipping companies electronically submit
dangerous goods manifests to Marine
Department using ebXML
Participating pilot shipping companies:
OOCL and APL
Pilot production in July 2003
Saved data reentry required by Web
Will cover other port formality documents, e.g. pre-
arrival notification, general declaration…
Issue: need to design XML Schemas for various
port formality documents
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 31
32. Dangerous Goods Declaration with ebXML
Shipping
Agents Paper submission
1
W
eb
su Marine
bm
2 iss Dept
io n
Internet
Hermes XML submission Hermes
MSH 3 ebXML Message Service MSH
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML
over HTTP on VPN 32
33. XML Schema Design and
Management Guide
For HKSARG to implement e-government joined-up services
– enhance data interoperability
Systematic modelling methodology for designing reusable
XML Schemas
– facilitates design of consistent, quality and reusable schemas
– consolidated international best practices, e.g. CCTS, UBL
Flexible management framework for standardizing Common
Schemas, e.g. HKID Number, Person Name, Postal Address
– minimizes repetitive data alignment efforts by standardizing
schemas for commonly used data elements
Under public consultation
– http://www.itsd.gov.hk/itsd/english/infra/eif.htm
Pilot project: HK Observatory plans to broadcast weather
information in XML through Web Services/HTTP
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 33
34. Weather Information in XML/WS
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 34
35. Digital Trade and
Transportation Network
A neutral, high-tech, and value-added e-logistics
platform
– facilitate information flow & service integration
– pearl River Delta (PRD), regionally & globally
– based on open-standards, e.g. XML / ebXML
– SME is an important focus
– releases 1 and 2 completed in 12-15 months
Return on investment
– estimated investment: HK$3B over 17 years
– estimated benefit: HK$11B over 17 years
http://www.logisticshk.gov.hk
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 35
37. Open-Source Software
(OSS) Development
Conditions to advance global e-commerce development
– high interoperability and reliability, low cost
– therefore, open standards and open-source software
HK is the world champion in ebXML OSS
FreebXML.org to promote the development and adoption of
open-source technologies for e-commerce
– international collaboration: HKU (HK), Cyclone (US), ECOM
(Japan), Kasetart U. (Thailand), KIEC (Korea), SigmaLogica (US),
Sterling Commerce (US), Sun (US), Sybase (US)
Our vision: FreebXML – the “Linux” and “Apache” in the e-
commerce development
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 37
38. 26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 38
39. Global Penetration of
Made-in-HK OSS
Many serious users in Asia and Europe!
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 39
40. About CECID
Center For E-Commerce Infrastructure Development
Technology focus: XML and Web Services
HKU R&D Center (15+ full-time staff)
Primarily funded by Innovation and Technology Fund
– establishment of ebXML infrastructure in HK
– business process and information interoperability platform
To enhance HK’s competitiveness in e-commerce development
– technology creation and transfer for the community
– provision of R&D and training services to businesses and the
government (R&D outsourcing)
– participation of international standardization initiatives
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 40
41. Our R&D Strategy
R&D
R&D Pilot Production
Products Projects Deployments
HK Lead
Projects / SIs
End
International
Collaborations
Users
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 41
42. When Should I Use XML?
When you need a buzzword in your
resume :-)
26 August 2003 HKCS XMLSG Speaker's Meeting - Mythical XML 42