INTERPRETING IMPERATIVE PROGRAMMING LAGUAGES IN EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATIONS (XSLT) Authors: Ruhsan Onder Assoc.

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
Copyright 2001, ActiveState. XSLT and Scripting Languages or…XSLT: what is everyone so hot and bothered about?
Inside an XSLT Processor Michael Kay, ICL 19 May 2000.
PHP I.
Advanced XSLT. Branching in XSLT XSLT is functional programming –The program evaluates a function –The function transforms one structure into another.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
Semantics Static semantics Dynamic semantics attribute grammars
Java Script Session1 INTRODUCTION.
XSLT (eXtensible Stylesheet Language Transformation) 1.
XSL XSLT and XPath 11-Apr-17.
ISBN Chapter 3 Describing Syntax and Semantics.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Distributed, parallel web service orchestration using XSLT Peter Kelly Paul Coddington Andrew Wendelborn.
XSLT XML DBs, and Schemas Week 18 DSA. The Whisky Case study XSLT can be applied in the client. –Add a xml processing instruction to the xml to bind to.
Rendering XML documents with XSL The most powerful approaches to rendering XML documents involve using XSL (eXtensible Stylesheet Language) XSL enables.
Describing Syntax and Semantics
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
COS 381 Day 16. Agenda Assignment 4 posted Due April 1 There was no resubmits of Assignment Capstone Progress report Due March 24 Today we will discuss.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
MC 365 – Software Engineering Presented by: John Ristuccia Shawn Posts Ndi Sampson XSLT Introduction BCi.
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
10/06/041 XSLT: crash course or Programming Language Design Principle XSLT-intro.ppt 10, Jun, 2004.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
JSP Standard Tag Library
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.
CSE3201/CSE4500 XPath. 2 XPath A locator for elements or attributes in an XML document. XPath expression gives direction.
CSE3201/CSE4500 Information Retrieval Systems
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
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.
WORKING WITH XSLT AND XPATH
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
1 XSLT An Introduction. 2 XSLT XSLT (extensible Stylesheet Language:Transformations) is a language primarily designed for transforming the structure of.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
Extensible Stylesheet Language Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University XSL-FO XSLT.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Transforming Documents „a how-to of transforming xml documents“ Lecture on Walter Kriha.
Lecture 11 XSL Transformations (part 1: Introduction)
March 28, 2001XSP Session O’Reilly Enterprise Java Conference 1 XSP Session Sue Spielman President/Consulting Engineer President/Consulting Engineer
CS 363 Comparative Programming Languages Semantics.
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.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
XP New Perspectives on XML, 2 nd Edition Tutorial 7 1 TUTORIAL 7 CREATING A COMPUTATIONAL STYLESHEET.
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
Oracle Data Integrator User Functions, Variables and Advanced Mappings
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XML Schema – XSLT Week 8 Web site:
XSLT, XML Schema, and XPath Matt McClelland. Introduction XML Schema ▫Defines the content and structure of XML data. XSLT ▫Used to transform XML documents.
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
1 XSLT XSLT (extensible stylesheet language – transforms ) is another language to process XML documents. Originally intended as a presentation language:
Unit 4 Representing Web Data: XML
XML in Web Technologies
Database Processing with XML
Chapter 7 Representing Web Data: XML
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
INTERPRETING IMPERATIVE PROGRAMMING LAGUAGES IN EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATIONS (XSLT) Authors: Ruhsan Onder
CS 431 – February 28, 2005 Carl Lagoze – Cornell University
Chapter 6: Programming Languages
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
Presentation transcript:

INTERPRETING IMPERATIVE PROGRAMMING LAGUAGES IN EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATIONS (XSLT) Authors: Ruhsan Onder Assoc. Prof. Dr. Zeki Bayram

OUTLINE Overview of work done XML based basic imperative language XIM Interpreter for XIM in XSLT Possible application areas Demonstration of a simple XIM code in execution Related work (XML based languages and their interpreters) Conclusion and future work References

OVERVIEW OF WORK DONE XML based basic imperative language XIM XIM; An XML based simple imperative language with basic constructs Assignment Loop (while) Conditional (if) Basic Arithmetic/Logic Operations Syntax description of XIM in XML Schema Interpretation, using XSLT

 Pseudo algorithm of a sample XIM program to compute 5! var fact ←1 var last ←5 begin while (last>1) do fact ←fact*last last ←last-1 end while end

XIM code to compute 5!

 Graphical representation of execution process XIM source code (XML doc.) Initializer stylesheet for sequencing Initializer stylesheet for attaching next info. XIM source code with Seq. info applier XIM code with Seq. & next info applier Resulting XIM code after execution of an instruction Interpreter Stylesheet Step 1 Step 2 Step 3 loop

XIM code after the application of 1 st Initializer Stylesheet

XIM code after the application of 2 nd Initializer Stylesheet

The Applier Program Pseudo algorithm of the C#.NET applier program 1. result tree ← XML document formed by the application of the initializer stylesheets to the original XIM program 2. While (the instruction to execute in result tree is not the element) result tree ← result of applying the interpreter stylesheet to result tree End While 3. Display the contents of the element

Applier (cont.) Written in C#.NET DOM is utilized for the traversal To check whether the instruction to be executed is an statement

Implementation of the XSLT Interpreter A named template for each construct A recursive named template for artihmetic / logic operations Expressions; infix binary trees Evaluator template calls itself until it comes to a leaf node which is a numeric literal or a variable To keep the sequence of the instruction to attributes A program counter (PC) is maintained by the interpreter

 Pseudo algorithm of the interpreter Match the instruction is equal to the number in PC Call the template which decides the type of instruction and calls the corresponding template The matched instruction node sent as a parameter to the corresponding templates Upon the return of the called template copy the main part of the XIM code P.S. Matching facility of XSLT & XPath queries utilized to  find the instruction to be executed  access the user defined variables in memory

 Pseudo algorithm of the templates Assignment Template  Copy all the variables in memory except PC and the one to whom a new value to be assigned  Call template for evaluation of the expression to be assigned  Recreate the variable with its new assigned value  Recreate the PC with its new value as of the current instruction

 Template for Conditional (If) and Loop (While) Evaluate the condition  Copy all other elements in the memory other than PC unchanged If the condition is true Update PC of the current instruction Else Update PC of the current instruction P.S. The distinction between If and While made by the initializer stylesheet during the insertion attributes

POSSIBLE APPLICATION AREAS Delivery of executable content over internet together with its executer With the combined initializers and the interpreter into a single styleseet to provide single-step execution This approach opens the way for the development of applications compatible with any browser. A standard XSLT processor implemented in every browser XIM can be improved to create a distributed computing web service application For use in special purpose computations requiring intensive CPU usage Upon the requests of the user through a GUI, constructed XIM prog. can be sent to the client by the server together with the interpreter

Scripting program running on web server Server Web Browser Client User request sent by the browser XIM code constructed according to the the user request + XSLT interpreter Requested operation and parameters from user Execution of incoming XIM code using the incoming interpreter Step 1: Step 2 : Step 3: Step 4: For a computation intensive application

Semantic Web is the name of a new emerging diversion of the current Web, but unlike the current version it aims to implement machine-readable- structured information oriented version of Web. Ideas of the interpreter can be developed to implement an XSLT inference engine for semantic web Through the reasoning of ontologies by XSLT, an XML decision tree can be created APPLICATION AREAS (contd.)

XIM code after the application of 2 nd Initializer Stylesheet

DEMONSTRATION Execution steps after the interpreter stylesheet is applied after the 1 st application of the interpreter stylesheet 5 11 after the execution of the first assignment statement in the loop after $last decremented and PC is updated as 1 to loop

Execution demo (cont.) condition of is satisfied and PC gets value $fact = $fact * $last $last is decremented and PC becomes 1 to loop

Execution demo (cont.) $last is decremented and PC becomes 1 to loop Sample program after the applier program terminates. Condition of evaluates to false and PC gets value to terminate loop

RELATED WORK An XML based scripting language and its interpreter in C++ [Arciniegas 2001] X-VRML ; An XML based language for modeling virtual reality whose interpeter is developed in Java [Walczak, Cellary 2002] XPEN ; An XML based format for distributed online handwriting recognition. Processing of it via a programming languagage through DOM [Lenaghan, Malyan 2003] A lazy XML parser via the implementation of lazy XSL transformations [Schott, Noga 2003]

CONCLUSION AND FUTURE WORK Operational Semantics of a simple XML based imperative language (XIM) is i mplemented in XSLT Execution of code through iterative application of the interpreter to the code  Current work Improving the interpreter for single-application to proivde for the delivery of a XIM program over Internet according to a user’s requirements, together with its data and interpreter Future work Implementation of denotational semantics of XIM by translating XIM programs into lambda calculus and interpreting the lambda calculus code using XSLT (web service semantics) Future Research XSLT inference engine for semantic web

 Improvement to the interpreter Execution at a single step without the applier program Initializers and interpreter are combined into a single stylesheet Via the use of temporary result-tee fragments (can be assigned to an XSLT variable) Stylesheet is declared in the source code using : Step by step execution is better for tracing

REFERENCES 1.w3c.org recommendations for XML, XML Schema, XSLT, XPath 2. F. A. Arciniegas. Creating C++ interpreters for XML extension languages. September K. Walczak and W. Cellary. X-VRML – XML based modeling of virtual reality. Proceedings of the 2002 symposium on applications and the internet (SAINT’02), pages 204–213, K.P. Lenaghan and R.R. Malyan. XPEN: An XML based format for distributed online handwriting recognition.Proceedings of the seventh international conference on document analysis and recognition (ICDAR’03), pages 1270–1274, S. Schott and M. L. Noga. Lazy XSL transformations. Proceedings of the 2003 ACM symposium on Document engineering, pages 9–18, 2003.

QUESTIONS ?