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.

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

Advanced XSLT II. Iteration in XSLT we sometimes wish to apply the same transform to a set of nodes we iterate through a node set the node set is defined.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
XSL eXtensible Stylesheet Language. What is XSL? XSL is a language that allows one to describe a browser how to process an XML file. XSL can convert an.
1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
XSLT (eXtensible Stylesheet Language Transformation) 1.
XSL XSLT and XPath 11-Apr-17.
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
XML and XSL Transforming your XML documents with eXtensible Stylesheet Language Transformations [Optional Lecture]
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
Extensible Stylesheet Language (XSL) By Example Tony Wat 9 October 2002.
XSLT Stylesheets Some more advanced examples (adapted from the Edinburgh LT site)
1 XSL – XML Stylesheet Language. 2 XSL XSL = XML Stylesheet Language XSL cosists of –XPath (navigation in documents) –XSLT (T for transformations) –XSLFO.
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
We Need Smart XML Processing HTML has ultra-complex semantics XML has no semantics Something must bridge the gap  A program ?  A clear set of data semantics?
XSL Concepts Lecture 7. XML Display Options What can XSL Transformations do? generation of constant text suppression of content moving text (e.g., exchanging.
XSL Unit 6 November 2. XSL –eXtensible Stylesheet Language –Basically a stylesheet for XML documents XSL has three parts: –XSLT –XPath –XSL-FO.
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Using XSLT and XPath to Enhance HTML Documents Reference: Roger L. Costello
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.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
Creating a Basic Web Page
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
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.
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
WORKING WITH XSLT AND XPATH
HTML and Style. Session overview Leveling-off on the basic concepts of HTML and Styles Discuss Web authoring options.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
DSpace UI Alexey Maslov. DSpace in general A digital library tool useful for storage, maintenance, and retrieval of digital documents Two types of interaction:
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
DWL TOOL FOR CREATING A CUSTOMIZED WEB-BASED SYSTEM GENERATOR Ling-Hua Chang, Sanjiv Behl, Tung-Ho Shieh, Chin-Chih Ou.
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
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 "
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Transforming Documents „a how-to of transforming xml documents“ Lecture on Walter Kriha.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
Lecture 11 XSL Transformations (part 1: Introduction)
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
ITB Web programming for E- Commerce 1 ITB6227 Programming for E-COMMERCE Lecture Presentation of XML Documents.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
XML Extras Outline 1 - XML in 10 Points 2 - XML Family of Technologies 3 - XML is Modular 4 - RDF and Semantic Web 5- XML Example: UK GovTalk Group’s Schema.
XP New Perspectives on XML, 2 nd Edition Tutorial 8 1 TUTORIAL 8 CREATING ELEMENT GROUPS.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
XSLT. XSLT stands for Extensible Stylesheet Language Transformations XSLT is used to transform XML documents into other kinds of documents. XSLT can produce.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
 XSL – Extensible Style Sheet Language  XSLT – XSL Transformations › Used to transform XML documents to other formats,like HTML or other XML documents.
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman.
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
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:
1 XSL Transformations (XSLT). 2 XSLT XSLT is a language for transforming XML documents into XHTML documents or to other XML documents. XSLT uses XPath.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
1 XSLT XSLT (extensible stylesheet language – transforms ) is another language to process XML documents. Originally intended as a presentation language:
Session IV Chapter 14 – Chapter 14 – XSLThttp://
Unit 4 Representing Web Data: XML
Creating an XSLT Style Sheet for Formatting Data
Tutorial 04 (cont’) Using XPath Patterns in an XSLT Style Sheet.
XSLT 1.0.
XML Data Introduction, Well-formed XML.
Unit 6 - XML Transformations
Presentation transcript:

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 what is available in Costello’s tutorial

3 Introduction and Motivation

4 Web Services A Web service is written using servlets, JSP or a similar technology The Web service interacts with databases using JDBC The Web service interacts with clients using a Web server The Web service may interact with other applications

5 The Traditional Approach The Web service generates HTML pages in order to interact with clients Changing the HTML pages necessitates a change in the Java code Different clients (e.g., pc, palm-pilot, cell phone) may require different HTML pages  Different versions of the Java code should be maintained HTML is not suitable for information exchange, e.g., interacting with automated agents (knowbots)

6 The XML Approach: Separating Content from Style The Web service generates XML documents Automated agents get XML documents in response to requests Other clients get HTML pages that are generated by adding style to the XML documents  It is easy to implement different styles for different clients

7 Where Should the Business Rules be Implemented? An example of a business rule  All products are now on sale at a discount of 10% Business rules may change frequently Where should they be implemented?  Database application  Servlet or JSP  XML transformation (by means of XSLT)

8 XML Transformations CSS can add style to XML, but it cannot transform an XML document  How can you change the price of a product in an XML document describing that product?  How can you add (to the XML document) the information that the product is on sale? XSLT can do just that

9 Even Just Adding Style May Require a Transformation Consider an XML document that describes several products and their prices How can you create a table with two columns – one for products and and one for prices? Cannot be done in CSS, but can be done in XSL

10 Different Types of Transformations Transform an XML document into  An HTML page  Another XML document  A text file Roger Costello’s tutorial covers the three types (and more)

11 How to Transform? Write an XSL style sheet Use an XSL processor to transform the XML document according the XSL style sheet, or Add a Stylesheet PI (Processing Instruction) to the XML document and display the XML document using a browser (recent versions only, e.g., IE 6 or Netscape 7)

12 Roger Costello’s Tutorial It describes the XSL language It gives many examples  There are actual files of the examples  Each example is in a separate folder and it includes An XML document An XSL style sheet The result of the transformation as produced by an XSL processor

13 A Few Things About XSL XSL is a high-level, functional language The syntax is a bit peculiar and possibly confusing An XSL style sheet is a valid XML document  Valid with respect to the XSL namespace Therefore, commands in XSL are XSL elements

14 How to Use the Examples Since XSL is a high-level language, XSL style sheets are relatively short and easy to understand It is easy to modify an existing style sheet into another style sheet with a similar functionality  The many examples of Costello are very useful as a starting point for writing your own style sheets

15 The Main Elements of XSL  This element is for extracting values from the given XML document  This element is for looping,, etc.  This element is for conditional processing

16 Examples of Xpath Expressions /university/department/course  This Xpath expression matches any path that starts at the root, which is a university element, passes through a department element and ends in a course  This Xpath expression matches any path that starts at the current element, continues to a child which is a department element and ends at a course element with a year attribute that is equal to 2002

17 How to Write a Style Sheet for Transforming XML to HTML Write a template in XHTML Add some necessary elements and PI (Processing Instructions) Inside the XHTML template, use XSL elements in order to extract values from the given XML document