Static Validation of Dynamically Generated XML Documents A survey on a series of papers by the BRICS research group at the University of Aarhus, Denmark.

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

ASP.NET Intro An introduction to the languages and communication of an ASP.NET system.
Microsoft Research March 20, 2000 A Programming Language for Developing Interactive Web Services Claus Brabrand BRICS, University of Aarhus, Denmark.
XML: Extensible Markup Language
Adding Dynamic Content to your Web Site
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
DT228/3 Web Development WWW and Client server model.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Caching Dynamic Documents Vipul Goyal Department of Computer Science & Engg Institute of Technology, Banaras Hindu University Sugata Sanyal School of Technology.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
The Application Layer Chapter 7. Electronic Mail Architecture and Services The User Agent Message Formats Message Transfer Final Delivery.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 16 – Part 2 The World Wide Web The New Yorker, Peter Steiner, July 5, 1993.
JSP Java Server Pages Reference:
DT228/3 Web Development JSP: Directives and Scripting elements.
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
Master’s Theses on Programming Validation Tools at Michael Schwartzbach
1 Designing an XML-based Exchange Format for Harmonia Marat Boshernitsan Susan L. Graham University of California, Berkeley, USA Exchange Formats Workshop.
Introduction to JavaScript Programming With XML and PHP Creating Interactive Web Pages Elizabeth Drake.
INTRODUCTION TO WEB DATABASE PROGRAMMING
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 9 JavaServer Pages (JSP) (Based on Møller.
Aurora: A Conceptual Model for Web-content Adaptation to Support the Universal Accessibility of Web-based Services Anita W. Huang, Neel Sundaresan Presented.
XForms: A case study Rajiv Shivane & Pavitar Singh.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
SDPL 2002Notes 7: Apache Cocoon1 7 XML Web Site Architecture Example: Apache Cocoon, a Web publishing architecture based on XML technology
XSLT for Data Manipulation By: April Fleming. What We Will Cover The What, Why, When, and How of XSLT What tools you will need to get started A sample.
Programming the Web Web = Computer Network + Hypertext.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
JSP Java Server Pages Softsmith Infotech.
Introduction to Java Server Pages (JSPs) Robert Thornton.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
Web Services Week 7 Aims: A detailed look at the underlying mechanisms for communication between web services Objectives: SOAP, WSDL, UDDI.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Nell Dale & John Lewis (adaptation by Michael Goldwasser) The World Wide Web.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Accessing XML Documents Using DOM ©NIITeXtensible Markup Language/Lesson 8/Slide 1 of 23 Objectives In this lesson, you will learn to: * Use XML DOM objects.
Creating PHP Pages Chapter 5 PHP Structure and Syntax.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
SOAP, Web Service, WSDL Week 14 Web site:
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
World Wide Web has been created to share the text document across the world. In static web pages the requesting user has no ability to interact with the.
National College of Science & Information Technology.
XML: Extensible Markup Language
Project 1 Introduction to HTML.
Unit 4 Representing Web Data: XML
Chapter 7 Representing Web Data: XML
Java Applets.
XML Problems and Solutions
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Presentation transcript:

Static Validation of Dynamically Generated XML Documents A survey on a series of papers by the BRICS research group at the University of Aarhus, Denmark. BRICS = Basic Research in Computer Science

Dynamic Construction of Web Pages Interactive Web Services request response Client with a browserWeb server Application-to-application Web Services Clients are not humans but general programs XML widely used as data interchange format for Web Services Typical solutions: embedded server-side scripting languages (PHP,ASP,JSP,etc) Problems: 1.Linear document construction (printing string fragments to output stream) 2.No compile-time validation of the generated XML (according to a schema)

Approaches to Statically Validate Dynamic XML Evolution: bigwig- bigwig - high-level C-based domain-specific programming language for developing interactive Web services; HTML templates are first-class values that may be computed ; and stored in variables; JWIG - JWIG - Java-based framework for Web service development; a flexible mechanism for dynamic construction and validation of XML documents, in particular XHTML; Xact Xact – an extension of JWIG applied on general XML, supports also deconstruction of XML documents; XML templates are first-class JAVA values; Main ideas: 1.Construction based on XML templates (sequences of XML trees containing named gaps) 2.Provide compile-time validation of transformed XML documents An XML schema S describes a set L(S) of XML documentsAn XML schema S describes a set L(S) of XML documents An XML document X is valid with respect to an XML schema S iff X is in the set L(S)An XML document X is valid with respect to an XML schema S iff X is in the set L(S) For a program, verify at compile-time that given that for each i.

XML templates An XML template is a well-formed XML fragment with named gaps: There are template gaps and attribute gaps. Both templates and strings (or arrays of these) can be plugged into template gaps. Only strings can be plugged into attribute gaps.

Construction Deconstruction of XML Templates The plug operation:The select and gapify operations:

Compile-time Output Validation Given an XML transformation T and an XML schema S, is it the case that whenever T outputs an XML document X, then X is valid with respect to S? This is a hard problem Practical solution – give approximate but safe (conservative) answers Perform dataflow analysis using Summary Graphs (a set of XML template values as nodes, and edges corresponding to possible plugging of gaps) The Program Analyzer 1. Construct summary graphs for each XML variable at each program point. The set of summary graphs constitutes a finite lattice (suitable for dataflow analysis). 2. Construct summary graphs from DTD schemas. 3. Validate summary graphs (of output XML docs) against DTD schemas. Set of possible XML docs Set of valid XML docs  3.Validation! 1.2.

Example – no errors import dk.brics.xact.*; public class Hello { XML person = [[ John Doe ]]; XML html = [[ Hello Hello ]]; public XML sayHello() { XML name = person.select("/person/name/text()")[0]; return html.plug("name", name); } public static void main(String[] args) { Hello hello = new Hello(); XML greeting = hello.sayHello(); greeting.analyze("xhtml1-transitional.dtd"); System.out.println(greeting); }} Output Code: Hello Hello John Doe Browser Output: Hello John Doe

Example – invalid output import dk.brics.xact.*; public class Hello { XML person = [[ John Doe ]]; XML html = [[ Hello Hello ]]; public XML sayHello() { XML name = person.select("/person/name/text()")[0]; return html.plug("name", name); } public static void main(String[] args) { Hello hello = new Hello(); XML greeting = hello.sayHello(); greeting.analyze("xhtml1-transitional.dtd"); System.out.println(greeting); }} Output Code: Hello Hello John Doe Browser Output: Hello John Doe The XACT analyzer reports the error! *** Invalid XML at line 26 XML template at line 8: attribute gap 'gbcolor' in element 'body' not declared

Example – plug error import dk.brics.xact.*; public class Hello { XML person = [[ John Doe ]]; XML html = [[ Hello Hello ]]; public XML sayHello() { XML name = person.select("/person/name/text()")[0]; return html.plug(“nema", name); } public static void main(String[] args) { Hello hello = new Hello(); XML greeting = hello.sayHello(); greeting.analyze("xhtml1-transitional.dtd"); System.out.println(greeting); }} Output Code: Hello Hello Browser Output: Hello The XACT analyzer reports the error! *** Inconsistent plug operation at line 20 Template gap 'nema' does not exist