Pervasive ecommerce with XML - PowerPoint PPT Presentation

About This Presentation
Title:

Pervasive ecommerce with XML

Description:

Since a DTD describes the structure of an XML document, it is the ideal target! ... To access such registries and allow publishing and search, Web forms are an ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 27
Provided by: bab6
Category:

less

Transcript and Presenter's Notes

Title: Pervasive ecommerce with XML


1
Pervasive e-commerce with XML
  • Babak Esfandiari
  • Carleton University
  • Ottawa, Canada

2
XML introduction
  • eXtensible Markup Language
  • a markup language for documents containing
    structured information (Walsh)
  • this structure is defined mainly with a set of
    tags
  • subset of SGML
  • HTML can be seen as an instance of XML (it is not
    really though, but that is not important)

3
XML example
  • lt?xml version"1.0" ?gt
  • lt!-- a simple tagset for museumsgt
  • ltMuseum name"Louvre"gt
  • ltcitygt Paris
  • lt/citygt
  • lt/Museumgt

4
DTD
  • Document Type Definition
  • Describes the XML tagset
  • lt!DOCTYPE Museum
  • lt!ELEMENT Museum (city)gt
  • lt!ATTLIST Museum name CDATA REQUIREDgt
  • lt!ELEMENT city (PCDATA)gt
  • gt
  • Not mandatory (!)

5
XML - what for?
  • content is independent from rendering
  • meta-data makes search easier
  • standard tags enable data interchange across
    tools
  • format for data and object persistence, human
    readable and editable
  • no need for a custom parser anymore

6
TourTags
  • The purpose of TourTags.org is to foster
    dialogue within the community in order to arrive
    at open standards for conducting electronic
    commerce by settling on common tag sets and
    methods in which they are to be used.
  • supports IFITTs RMSIG

7
XML and TourTags
  • derive a tagset from RMSIG specs
  • discuss/modify the tagset
  • use the tagset for B2B (ebXML)
  • allow device-neutral access to business info
  • we have a process

8
The Acronym Hell Diagram
  • our process is a series of transformations

HTML
UML
ebXML
XML
WML
XMI
Web form
Voice XML
XML/ DTD
registration
document
display
meta-data
9
Meta-data
  • Why not directly model tags?
  • Tags are not for modeling!
  • Lack of a graphical notation
  • Semantically poor
  • Hard to represent relationships
  • XML can be seen as one possible mapping of a
    model
  • The RMSIG has chosen UML

UML
XMI
XML/ DTD
10
Meta-data
  • UML Unified Modeling Language
  • Object-oriented
  • Graphical
  • Covers
  • Requirements
  • Static representation
  • Activities and processes

UML
XMI
XML/ DTD
11
Meta-data
  • A UML class diagram

UML
XMI
XML/ DTD
12
Meta-data
  • But we need the tags!
  • Is it possible to transform UML into XML?
  • We can use XMI
  • XMI is the direct textual representation of UML
    using the XML format
  • Most UML tools support XMI

UML
XMI
XML/ DTD
13
Meta-data
  • A sample XMI document
  • ltClassgt
  • ltnamegtMuseumlt/namegt
  • ltfeaturegt
  • ltAttributegt
  • ltnamegtnamelt/namegt
  • lt/Attributegt
  • lt/featuregt
  • lt/Classgt

UML
XMI
XML/ DTD
14
Meta-data
  • We still need to transform XMI into our XML
    tagset
  • Since a DTD describes the structure of an XML
    document, it is the ideal target!
  • What is the easiest way to do the concrete
    transformation?

UML
XMI
XML/ DTD
15
Transformations
  • Different methods
  • Parsing use existing XML parsing libraries based
    on standard APIs (SAX, DOM) with a programming
    language
  • Transformations
  • specify the transformations in a (yet another)
    XML document called an XSLT stylesheet
  • Use an XSLT processor (Saxon, XT, )

16
XSLT example (excerpt)
  • ltxslstylesheetgt
  • ltxsltemplate match"Class"gt
  • blah ltxslvalue-of select"name"/gt blah
  • ltxslapply-templates select"feature/Attribute"/gt
  • lt/xsltemplategt
  • ltxsltemplate match"feature/Attribute"gt
  • ltxslvalue-of select"name"/gt
  • lt/xsltemplategt
  • lt/xslstylesheetgt

17
XSLT example
  • The XSLT in the previous slide, applied on the
    Museum XMI, should generate something like
  • blah Museum blah name
  • Nothing exciting but you get the idea!

18
Meta-data
  • Some of the issues in the transformation from XMI
    to DTD
  • Ambiguity in choice of attributes and elements -gt
    open for discussion!
  • Inheritance compound the inherited attributes
  • Composition recursively add sub-elements, or use
    separate documents
  • DTDs support for primitive types is limited XML
    schema an alternative

UML
XMI
XML/ DTD
19
Registration
  • The resulting DTDs can now be used for B2B
    e-commerce
  • We now have a domain ontology to base
    transactions on!
  • We can use this ontology to
  • Publish/advertize a business
  • Search for a business
  • We need a registry to enable that

ebXML
Web form
20
Registration
  • ebXML is one of the leading consortiums for
    e-business
  • It describes a standard for B2B registries
  • Third parties (TourTags?) have the opportunity to
    create and host such registries
  • To access such registries and allow publishing
    and search, Web forms are an intuitive front-end
    interface
  • Guess what

ebXML
Web form
21
Registration
  • We can use the DTDs and XSLT to generate such web
    forms!
  • The web forms for publishing and search are very
    similar
  • Each leaf element or attribute becomes a field to
    fill in
  • Better support (than DTDs) for data types would
    allow for a better customization of the data
    fields

ebXML
Web form
Museum name
22
Registration
  • Different deployment scenarios are possible for
    registries
  • Traditional Client/server
  • Peer to peer
  • Decentralized
  • Less resource intensive

ebXML
Web form
23
Document rendering
  • The result of a registry search is an XML
    document that follows the structure specified by
    our DTD
  • Such a document does not contain any instructions
    for rendering (i.e. display)
  • This is a good thing!

HTML
XML
WML
Voice XML
24
Search and rendering
  • rendering adapted to device
  • XML -gt HTML for web browser
  • XML -gt WML for cell phones
  • XML -gt VoiceXML for regular phones
  • Yes, we can use XSLT again!
  • No duplication of data!
  • No need to maintain redundant documents!

HTML
XML
WML
Voice XML
25
Conclusion
  • A completely XML-based process that takes us from
    the inception of a domain ontology to the
    delivery of business info
  • The process relies on a series of transformations

26
References
  • xml.org
  • rmsig.org
  • tourtags.org
  • ebxml.org
  • It had to be on the web!
Write a Comment
User Comments (0)
About PowerShow.com