XML to XML through XML - PowerPoint PPT Presentation

About This Presentation
Title:

XML to XML through XML

Description:

How Adaptation of XML Transformations May Be Done by the ... Output and input spec may use same formalism. WebNet 2001. TU/e. technische universiteit eindhoven ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 29
Provided by: FlaviusF5
Category:
Tags: xml | formalism | through

less

Transcript and Presenter's Notes

Title: XML to XML through XML


1
XML to XML through XML
  • Pim Lemmens
  • Geert-Jan Houben

Eindhoven University of Technology Dept. of
Computer Science
2
XML to XML through XML
  • How Adaptation of XML Transformations May Be Done
    by the Same Tool As Used for the Transformations
    Themselves

3
Hera Architecture
Relational Database
Object-Oriented Database
XML Database

ODB-XML Wrapper
RDB-XML Wrapper
Mediator/ Integrator
Information Retrieval
User/Platform Adaptation
Hypermedia Presentation
Logical Presentation
Logical-WML Presentation
Logical-SMIL Presentation
Logical-HTML Presentation
HTML Presentation
SMIL Presentation
WML Presentation
Query

4
XML Transformations
  • Document screening
  • Data retrieval, querying
  • Applying style sheets
  • Adaptation of those transformations to
  • User profiles
  • Platform requirements
  • Producer preferences
  • ..

5
Transformations in HERA
Source data
Query adaptation
Generic query
Adapted query
Filtered data
Generic stylesheet
Adapted stylesheet
Output data
Stylesheet adaptation
6
Transformation Tools
  • XSLT
  • XQuery
  • Something different (for adaptation) HTL

7
Single Tool for All Transformations
  • transformation of documents
  • transformation of transformation specifications
  • transformation specifications documents
  • transformation specification schema
  • document instance
  • schema instance

8
Transformation and Document
  • House query (schema)
  • lthousegt
  • ltpricegt
  • 120,000
  • lt/pricegt
  • lt/housegt
  • House doc (instance)
  • lthouse idh123gt
  • ltpricegt
  • 100,000
  • lt/pricegt
  • ltaddressgt..lt/addressgt
  • lt/housegt
  • lthouse idh234gt

9
Requirements for HERA Transformations
  • Isomorphism between schema and instance
  • Separate items separately accessible
  • Separation of input and output document
    specifications
  • One uniform mechanism for specifying structure,
    values and operations, independent of their use

10
Req 1 Isomorphism Schema - Instance
  • Schema element/attribute name instance
    element/attribute name
  • Schema children or attributes of element ?
    instance children or attributes of element
  • Schema element/attribute values ? instance
    element/attribute values
  • Arbitrary length list in instance represented by
    e.g. special kind of loop in schema

11
Req 2 Separate Items Separately Accessible
  • All HTL entities should be accessible to HTL
  • Items to be found in input
  • Values to be changed
  • Items to be used for output
  • Operands to be used in calculations
  • DOM nodes
  • Elements
  • Attributes
  • Text nodes

12
DOM Nodes
house
  • lthouse year1980gt
  • ltpricegt
  • 120,000
  • lt/pricegt
  • Nice house in
  • good condition
  • lt/housegt

year
price
Nice ..
120,000
1980
13
Req 3 Separation of Input Output Spec
  • Output spec not limited by input spec
    requirements
  • Input spec not limited by output spec
    requirements
  • Requires links between input and output spec
  • Output and input spec may use same formalism

14
Req 4 One Mechanism for All
  • Output specification (structure, values, names)
  • Input selection (structures, values, names)
  • Calculation (operators, operands)
  • All described using templates

15
Input and Output Templates
  • Input template
  • lthtltemplategt
  • lthouse htlid123gt
  • ltprice/gt
  • ltaddress/gt
  • ltcity/gt
  • lt/housegt
  • lt/htltemplategt
  • Output template
  • lthtltemplategt
  • lthtlselect idref123gt
  • ltexpensesgt
  • lthtlvalue-ofgt
  • ltprice/gt
  • lt/htlvalue-ofgt
  • lt/expensesgt

16
Requirements for HERA Transformations
  • Recap
  • Isomorphism between schema and instance
  • Separate items separately accessible
  • Separation of input and output document
    specifications
  • One mechanism for specifying structure, values
    and operations

17
Why Not Use XSLT?
  • Well tested, efficient and widely available
  • Structure of specification very different from
    structure of documents
  • Paths defined using XPath expressions hard to
    transform
  • Input driven processing (and output) order
    determined by input document.

18
Why Not Use XQuery?
  • Separate query and output generation parts
  • Output spec has XML structure
  • But, input spec has not an XML structure query
    part needs string parsing

19
HTL HERA Transformation Language
  • Templates used for input spec, output spec and
    calculation spec
  • Separate output spec input spec templates
  • Templates may use sub-templates
  • Filter specification input data to be used
  • Selection specification retrieved data to be
    inserted in output or used for calculations

20
Templates and Sub-templates
  • ltagt
  • ltbgt .. lt/bgt
  • ltcgt lthtlparam idrefp/gt lt/cgt
  • ltd/gt
  • lt/agt
  • lthtltemplate htlidpgt ltqgt ltrgt lt/htltemplategt

21
Filtering and Selection
Filter specification
Output specification
22
Templates and Path Expressions
  • lthtltemplategt
  • ltagt
  • ltb htlidxyzgt
  • ltd/gt lte/gt ltf/gt
  • lt/bgt
  • lt/agt
  • lt/htltemplategt
  • Equivalent XPath expression when accessed through
    idref xyz
  • a/bd e f

23
Templates and Calculations
  • lthtlattribute nameagt
  • lthtlfromgt
  • lthtloperator opgt
  • ltprice/gt
  • 10
  • lt/htloperatorgt
  • lt/htlfromgt
  • lt/htlattributegt
  • XPath
  • _at_a gt (price 10)

24
List of HTL Elements
  • htltransform
  • htltemplate
  • htloutput
  • htlattribute
  • htlfrom
  • htlto
  • htloperator
  • htlparam
  • htlany
  • htl descendant
  • htlselect
  • htlname-of
  • htlvalue-of
  • htlcopy
  • (attribute) htlid

25
Implementation
  • XSLT
  • Proven technology
  • HTL-to-XSLT conversion by XSLT
  • Semantics defined in terms of XSLT
  • Use of XPath operators
  • Additional translation step required
  • Use of separate XSLT templates and modes not
    possible

26
Conclusions
  • Tool for XML transformations that allows
    transformations on transformations
  • Schema isomorphic to instance
  • Basic entities correspond to DOM nodes
  • Separation of input output specification
  • All expressions represented by XML structures
  • Implementation XSLT

27
Contact Information
  • W.J.M. Lemmens
  • Eindhoven University of Technology
  • P.O. Box 513
  • NL 5600 MB Eindhoven
  • E-mail W.J.M.Lemmens_at_tue.nl
  • Phone (31)(0)402473755

28
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com