Composing XSL Transformations with XML Publishing Views Chengkai LiUniversity of Illinois at Urbana-Champaign Philip Bohannon Lucent Technologies, Bell.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

Chungnam National University DataBase System Lab
Inside an XSLT Processor Michael Kay, ICL 19 May 2000.
XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
XML: Extensible Markup Language
 2001 Prentice Hall, Inc. All rights reserved. 1.
XSLT (eXtensible Stylesheet Language Transformation) 1.
Relational Databases for Querying XML Documents: Limitations & Opportunities VLDB`99 Shanmugasundaram, J., Tufte, K., He, G., Zhang, C., DeWitt, D., Naughton,
An Algorithm for Streaming XPath Processing with Forward and Backward Axes Charles Barton, Philippe Charles, Deepak Goyal, Mukund Raghavchari IBM T. J.
XML Views El Hazoui Ilias Supervised by: Dr. Haddouti Advanced XML data management.
XSL Concepts Lecture 7. XML Display Options What can XSL Transformations do? generation of constant text suppression of content moving text (e.g., exchanging.
A note on generating text with the xsl:value-of instruction.
XSL Transformations Lecture 8, 07/08/02. Templates The whole element is a template The match pattern determines where this template applies Result element(s)
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
XML Language Family Detailed Examples Most information contained in these slide comes from: These slides are intended.
2005rel-xml-i1 Relational to XML Transformations  Background & Issues  Preliminaries  Execution strategies  The SilkRoute System.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
17 Apr 2002 XML Stylesheets Andy Clark. What Is It? Extensible Stylesheet Language (XSL) Language for document transformation – Transformation (XSLT)
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
XML-to-Relational Schema Mapping Algorithm ODTDMap Speaker: Artem Chebotko* Wayne State University Joint work with Mustafa Atay,
XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.
CSE3201/CSE4500 XPath. 2 XPath A locator for elements or attributes in an XML document. XPath expression gives direction.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
XML for E-commerce III Helena Ahonen-Myka. In this part... n Transforming XML n Traversing XML n Web publishing frameworks.
CSE3201/CSE4500 Information Retrieval Systems
ColdFusion’s XML Capabilities Maryland CFUG April 12, 2005 Presented by Doug Ward.
IT420: Database Management and Organization XML 21 April 2006 Adina Crăiniceanu
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
Extensible Markup and Beyond
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
Module Road Map Credit Categories Assignment 2 Credit Category 2 You are able to demonstrate how data may be filtered using Xpath You are able to demonstrate.
Querying Structured Text in an XML Database By Xuemei Luo.
1 XSLT An Introduction. 2 XSLT XSLT (extensible Stylesheet Language:Transformations) is a language primarily designed for transforming the structure of.
Efficient XSLT Processing in Relational Database System Zhen Hua Liu Anguel Novoselsky Oracle Corporation VLDB 2006.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XSLT part of XSL (Extensible Stylesheet Language) –includes also XPath and XSL Formatting Objects used to transform an XML document into: –another XML.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Lecture 11 XSL Transformations (part 1: Introduction)
Computing & Information Sciences Kansas State University Thursday, 15 Mar 2007CIS 560: Database System Concepts Lecture 24 of 42 Thursday, 15 March 2007.
XSLT Introduction. XSLT is the transformation part of XSL An XSLT file contains rules which are applied against and XML file to produce an output Outputs.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
Lecture A/18-849B/95-811A/19-729A Internet-Scale Sensor Systems: Design and Policy Lecture 24 – Part 2 XML Query Processing Phil Gibbons April.
Jennifer Widom XML Data Introduction, Well-formed XML.
XML and Database.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
More XML XPATH, XSLT CS 431 – February 23, 2005 Carl Lagoze – Cornell University.
Dec. 13, 2002 WISE2002 Processing XML View Queries Including User-defined Foreign Functions on Relational Databases Yoshiharu Ishikawa Jun Kawada Hiroyuki.
University of Nottingham School of Computer Science & Information Technology Introduction to XML 2. XSLT Tim Brailsford.
Martin Kruliš by Martin Kruliš (v1.1)1.
Scheduling of Transactions on XML Documents Author: Stijin Dekeyser Jan Hidders Reviewed by Jason Chen, Glenn, Steven, Christian.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
CITA 330 Section 5 XPath. XSL XSL (Extensible Stylesheet Language) is the standard language for writing stylesheets to transform XML documents among different.
XML Schema – XSLT Week 8 Web site:
Some Notes on XSLT Eugenia Fernandez IUPUI. Transforming XML with XSLT XSLT processor converts XML document into a node tree Uses XSLT stylesheet for.
XSLT, XML Schema, and XPath Matt McClelland. Introduction XML Schema ▫Defines the content and structure of XML data. XSLT ▫Used to transform XML documents.
Querying Structured Text in an XML Database Shurug Al-Khalifa Cong Yu H. V. Jagadish (University of Michigan) Presented by Vedat Güray AFŞAR & Esra KIRBAŞ.
1 XSLT XSLT (extensible stylesheet language – transforms ) is another language to process XML documents. Originally intended as a presentation language:
Module Road Map Document Transformations Web Form (ASPX) HTML Form.
XML: Extensible Markup Language
Querying and Transforming XML Data
(b) Tree representation
XML Data Introduction, Well-formed XML.
2/18/2019.
Querying XML XSLT.
More XML XML schema, XPATH, XSLT
Unit 6 - XML Transformations
Presentation transcript:

Composing XSL Transformations with XML Publishing Views Chengkai LiUniversity of Illinois at Urbana-Champaign Philip Bohannon Lucent Technologies, Bell Labs Henry F. Korth Lehigh University PPS NarayanLucent Technologies, Bell Labs SIGMOD 2003

2 Motivation XML: popular for data representation and exchange  The data: stored in RDBMS  Vast majority of existing data stored in RDBMS  Efficiency, robustness of RDBMS for XML applications  XML Publishing Views (SilkRoute, XPERANTO)  The query: expressed as XSLT  Designed for document transformation  Popular as XML query language How to evaluate queries on relational data posed in XSLT?

3 XML Publishing SQL queryes Relational DB Query Logic Tagger XML data Publisher view query: specifies the mapping between relational tables and resulting XML document. view query

4 Example: tables and schema of view HOTEL hotelidnamestarmetro_id 1Hyatt2NYC 2Hilton4CHI metroidname NYCNew York City CHIChicago METROAREA ROOM hotel_idroom #available 1101F 1102F 21T 22F / metro (name) hotel (name, star) room (#)total_roomavailable

5 Example: published XML document / metro (“Chicago”)metro (“New York City”) room (2) total_room available room (1) 2 hotel (“Hilton”, 4) room (102) total_room room (101) 2 hotel (“Hyatt”, 2)

6 Example of View Query  Relational Schema Metroarea(metroid, metroname) Hotel(hotelid, hotelname, starrating, metro_id) Room(hotel_id, room#, available)  Desired Hierarchical Structure of Published XML $m = SELECT metroid, metroname FROM metroarea $h =SELECT * FROM hotel WHERE metro_id = $m.metroid AND starrating > 4 /

7 Evaluate XSLT queries on relational data? publisher XSLT stylesheet view query view

8 Approach 1: Materialization Approach 1 XML parsing  relational engine for XML processing  unnecessary materialization of nodes  1 XML data publisher XSLT stylesheet view query XSLT processor materialized view

9 Unnecessary Materializations rule 1. metro : output name rule 2. hotel no output rule 3. total_room : output total number of rooms nodes that do not satisfy type requirement nodes that do not satisfy selection condition nodes not involved in output / metro (“Chicago”) metro (“New York City”) room (2) total_room available room (1) 2 hotel (“Hilton”, 4)

10 Approach 2: View Composition + new view query publisher 1 2 XML data publisher XSLT stylesheet view query XSLT processor XSLT stylesheet view query XML data materialized view Approach 1Approach 2 XML parsing  relational engine for XML processing  unnecessary materialization of nodes 

11 Algorithm Overview nodes that do not satisfy type requirements: What type of nodes are accessed? nodes that do not satisfy selection condition : What are the instances of these types of nodes? nodes not involved in output: How do we avoid materializing uninvolved nodes? / metro (“Chicago”) metro (“New York City”) room (2) total_room available room (1) 2 hotel (“Hilton”, 4)

12 Algorithm Overview view query XSLT stylesheet new view query + Context Transition Graph (CTG) Traverse View Query (TVQ) Output Tag Tree (OTT) What type of nodes are accessed? What are the instances of these types of nodes? How do we avoid materializing nodes uninvolved in output?

13 Example of XSLT Stylesheet R1: R2: R3:

14 Template Rule A stylesheet consists of a set of template rules. R = < match_pattern(r), output(r), select_expression(r) > match the root generate output process total_room for all hotels of all metro areas

15 Simplified Representation R1: match=“/” select=“metro/hotel/total_room” R2: match=“total_room” select=“../available/../room” R3: match=“metro/hotel/room”

16 XSLT processing R1: match=“/” select=“metro/hotel/total_room” R2: match=“total_room” select=“../available/../room” R3: match=“metro/hotel/room” / (/, R1) (total_room,R2) (room,R3)

17 Context Transition Graph (CTG) (/, R1) (total_room,R2) (room,R3) Document instances of may be matched by R2, which further selects document instances of, which may be matched by R3. MATCHQ: nodes SELECTQ: edges CTG: Which type of nodes are accessed? total_room: context node room: new context node

18 Instances of accessed nodes? (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new=?

19 Traverse View Query (TVQ) (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new =SELECT * FROM room WHERE hotel_id=$t_new.hotelid AND EXISTS (SELECT * FROM room WHERE hotel_id=$t_new.hotelid AND available = TRUE) TVQ: Instances of accessed nodes

20 TVQ: Instances of accessed nodes R2: match=“total_room” select=“../available/../room” R3:match=“metro/hotel/room” Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new=?

21 Select-Match Tree: How does context transition happen? Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new=?

22 UNBIND: Select-Match Tree  tag query Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new=?

23 UNBIND: Select-Match Tree  tag query Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new=? $r =SELECT * FROM room WHERE hotel_id=$h.hotelid

24 UNBIND: Select-Match Tree  tag query Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new =SELECT * FROM room WHERE hotel_id=$t_new.hotelid $r =SELECT * FROM room WHERE hotel_id=$h.hotelid

25 UNBIND: Select-Match Tree  tag query Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new =SELECT * FROM room WHERE hotel_id=$t_new.hotelid $a=SELECT * FROM room WHERE hotel_id=$h.hotelid AND available = TRUE

26 UNBIND: Select-Match Tree  tag query Select-Match Tree (/, R1) (total_room,R2) $t_new= … (room,R3) $r_new = SELECT * FROM room WHERE hotel_id=$t_new.hotelid AND EXISTS (SELECT * FROM room WHERE hotel_id=$t_new.hotelid AND available = TRUE) $a=SELECT * FROM room WHERE hotel_id=$h.hotelid AND available = TRUE

27 UNBIND: General Cases General Select-Match Tree with Predicates  Unbind along the lowest common ancestor to the new context node (FROM)  Nest of all sub-trees not on the two paths (WHERE EXISTS)  Attribute access of all nodes (WHERE) lowest common ancestor a=10 b<5 context node new context node

28 Output Tag Tree (root, R1) (total_room,R2) (room,R3)

29 Output Tag Tree (OTT) R1: apply-template (root, R1) (total_room,R2) (room,R3)

30 Output Tag Tree (OTT) R2: apply-template (root, R1) (total_room,R2) (room,R3)

31 Output Tag Tree (OTT) R3: (root, R1) (total_room,R2) (room,R3)

32 New View Query Forced Unbind during the generation of OTT (root, R1) (total_room,R2) (room,R3)

33 XSLT_basic  no type coercion  no document order  no “//”  no function  no variable and parameter  no recursion  no predicate in expression  no flow-control elements (,, )  no conflicting rule resolution  select of is “.”

34 Relaxing Assumptions  recursion  predicate in expression  flow-control elements (,, )  conflicting rule resolution  select of be other than “.” and

35 Summary  Problem: Composing XSL Transformations with XML publishing views  Advantages compared with materialization approach  Algorithm  Context Transition Graph  Traverse View Query  Output Tag Tree  Relaxing Assumptions

36 Future Work  //: CTG graph  multigraph  recursion

37 Related Work  Translating XSLT into SQL queries: Jain et al, WWW 02  XML publishing middleware  SilkRoute: Fernandez et al, WWW 00, SIGMOD 01  XPERANTO: Carey et al, WebDB 00 & Shanmugasundaram et al, VLDB 01  Incorporating XSL processing into database engines: Moerkotte, VLDB 02