XML Trends & Developments

XML Foundations [./]
Fall 2008 — INFO 242 (CCN 42572)

Erik Wilde, UC Berkeley School of Information
2008-12-09

Creative Commons License [http://creativecommons.org/licenses/by/3.0/]

This work is licensed under a CC
Attribution 3.0 Unported License
[http://creativecommons.org/licenses/by/3.0/]

Contents E. Wilde: XML Trends & Developments

Contents

E. Wilde: XML Trends & Developments

(2) Abstract

XML is a very basic technology for representing trees using a standardized markup-based syntax. An increasing number of technologies are building on this foundation, creating an expanding field of XML-based technologies for interoperability in many different fields. Application-specific XML-based data formats are used in many different settings, and the best data format for a given scenario depends on the existing formats in this area and the exact requirements. More interestingly, generic XML technologies which can be applied in many different settings make it easier for developers and system integrators to achieve their goal of making system interoperate.



E. Wilde: XML Trends & Developments

(3) XML 2.0



Web Services

Outline (Web Services)

  1. Web Services [5]
  2. XForms [3]
  3. Semantic Web [8]
    1. Microformats [2]
    2. Resource Description Framework (RDF) [4]
  4. Conclusions [1]
Web Services E. Wilde: XML Trends & Developments

(5) XML-Based Distributed Programming



Web Services E. Wilde: XML Trends & Developments

(6) Web Service Technologies



Web Services E. Wilde: XML Trends & Developments

(7) SOAP Example Message

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Header>
  <m:reservation xmlns:m="http://travelcompany.example.org/reservation" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true">
   <m:reference>uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d</m:reference>
   <m:dateAndTime>2001-11-29T13:20:00.000-05:00</m:dateAndTime>
  </m:reservation>
  <n:passenger xmlns:n="http://mycompany.example.com/employees" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true">
   <n:name>Åke Jógvan Øyvind</n:name>
  </n:passenger>
 </env:Header>
 <env:Body>
  <p:itinerary xmlns:p="http://travelcompany.example.org/reservation/travel">
   <p:departure>
    <p:departing>New York</p:departing>
    <p:arriving>Los Angeles</p:arriving>
    <p:departureDate>2001-12-14</p:departureDate>
    <p:departureTime>late afternoon</p:departureTime>
    <p:seatPreference>aisle</p:seatPreference>
   </p:departure>
   <p:return>
    <p:departing>Los Angeles</p:departing>
    <p:arriving>New York</p:arriving>
    <p:departureDate>2001-12-20</p:departureDate>
    <p:departureTime>mid-morning</p:departureTime>
    <p:seatPreference/>
   </p:return>
  </p:itinerary>
  <q:lodging xmlns:q="http://travelcompany.example.org/reservation/hotels">
   <q:preference>none</q:preference>
  </q:lodging>
 </env:Body>
</env:Envelope>


Web Services E. Wilde: XML Trends & Developments

(8) WSDL Example (Google)

 <portType name="GoogleSearchPort">
  <operation name="doGetCachedPage">
   <input message="typens:doGetCachedPage"/>
   <output message="typens:doGetCachedPageResponse"/>
  </operation>
  <operation name="doSpellingSuggestion">
   <input message="typens:doSpellingSuggestion"/>
   <output message="typens:doSpellingSuggestionResponse"/>
  </operation>
  <operation name="doGoogleSearch">
   <input message="typens:doGoogleSearch"/>
   <output message="typens:doGoogleSearchResponse"/>
  </operation>
 </portType>


Web Services E. Wilde: XML Trends & Developments

(9) UDDI Data Model

uddi-datamodel.gif

XForms

Outline (XForms)

  1. Web Services [5]
  2. XForms [3]
  3. Semantic Web [8]
    1. Microformats [2]
    2. Resource Description Framework (RDF) [4]
  4. Conclusions [1]
XForms E. Wilde: XML Trends & Developments

(11) HTML Forms Limitations



XForms E. Wilde: XML Trends & Developments

(12) XForms



XForms E. Wilde: XML Trends & Developments

(13) XForms Limitations



Semantic Web

Outline (Semantic Web)

  1. Web Services [5]
  2. XForms [3]
  3. Semantic Web [8]
    1. Microformats [2]
    2. Resource Description Framework (RDF) [4]
  4. Conclusions [1]
Semantic Web E. Wilde: XML Trends & Developments

(15) XML is Syntax

<?xml version="1.0" encoding="UTF-8"?>
<文書 改訂日付="1999年3月1日">
 <題>サンプル</題>
 <段落>これはサンプル文書です。</段落>
 <!-- コメント -->
 <段落>会社名</段落>
 <図面 図面実体名="サンプル" />
</文書>


Semantic Web E. Wilde: XML Trends & Developments

(16) Semantics



Microformats

Outline (Microformats)

  1. Web Services [5]
  2. XForms [3]
  3. Semantic Web [8]
    1. Microformats [2]
    2. Resource Description Framework (RDF) [4]
  4. Conclusions [1]
Microformats E. Wilde: XML Trends & Developments

(18) Islands of Semantics

  • Microformats solve very specific problems in a very specific way
    • encoding address information on a Web page
    • encoding a location of something represented by a Web resource
  • Microformats can be compared to tagging
    • a very simple mechanism with a minimal barrier-to-entry
    • little flexibility in adapting the mechanism to slightly other uses
    • often underspecified and interpretation implementation-dependent
    • no unified rules across different platforms which makes processing hard
    • nice and easy to start with, but questionable for robust long-term solutions
  • Currently there are about 10 reasonably popular microformats


Microformats E. Wilde: XML Trends & Developments

(19) Microformat Syntax

  • HTML has some underspecified and underused elements
    • dfn, code, samp, kbd, var, cite, abbr, acronym
    • they can be reused and augmented with additional information
  • HTML allows non-HTML content in HTML pages
    • unknown elements and attributes must be ignored
  • HTML allows class attributes to carry semantics
    • XHTML 2 attempts to move this functionality to a role attribute [http://www.w3.org/TR/xhtml-role/]
  • HTML has a head which contains page metadata
    • for example, the link element specifies connections to other resources


Resource Description Framework (RDF)

Outline (Resource Description Framework (RDF))

  1. Web Services [5]
  2. XForms [3]
  3. Semantic Web [8]
    1. Microformats [2]
    2. Resource Description Framework (RDF) [4]
  4. Conclusions [1]
Resource Description Framework (RDF) E. Wilde: XML Trends & Developments

(21) Describing Resources

  • RDF describes everything in triples
    • making a statement about a resource (identified by a URI [XML Basics; Uniform Resource Identifier (URI) (1)]
    • describing a certain property of the resource
    • specifying a value for that property
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
  <contact:Person rdf:about="http://www.w3.org/People/EM/contact#me">
    <contact:fullName>Eric Miller</contact:fullName>
    <contact:mailbox rdf:resource="mailto:em@w3.org"/>
    <contact:personalTitle>Dr.</contact:personalTitle> 
  </contact:Person>
</rdf:RDF>
[http://www.w3.org/TR/REC-rdf-syntax/#intro]

Resource Description Framework (RDF) E. Wilde: XML Trends & Developments

(22) RDF Graphs

rdf-graph.png

Resource Description Framework (RDF) E. Wilde: XML Trends & Developments

(23) RDF is Simple and Complex

  • RDF's abstract model [http://www.w3.org/TR/rdf-concepts/] is the idea of descriptive triples
    • the actual RDF model is rooted in description logic
    • RDF itself can only describe individuals (something identified by URI)
  • RDF/XML [http://www.w3.org/TR/rdf-syntax-grammar/] is an XML syntax for encoding triples
    • the syntax allows a variety of ways to represent the same RDF statements
    • processing RDF/XML with XML tools is likely to fail
    • use RDF parsers to parse all variations of RDF/XML into an abstract RDF graph
  • RDF Schema [http://www.w3.org/TR/rdf-schema/] supports the creation of RDF vocabularies
    • describe the classes of things that can be used in statements
    • describe the properties which can be used for each of these classes
    • describe the allowed values for the supported properties


Resource Description Framework (RDF) E. Wilde: XML Trends & Developments

(24) RDF Schema Graph

rdfs-graph.png

Conclusions

Outline (Conclusions)

  1. Web Services [5]
  2. XForms [3]
  3. Semantic Web [8]
    1. Microformats [2]
    2. Resource Description Framework (RDF) [4]
  4. Conclusions [1]
Conclusions E. Wilde: XML Trends & Developments

(26) XML is Growing



2008-12-09 XML Foundations [./]
Fall 2008 — INFO 242 (CCN 42572)