Set 8.5: XSLT Continued IT452 Advanced Web and Internet Systems.

Slides:



Advertisements
Similar presentations
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
Advertisements

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.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Extensible Stylesheet Language (XSL) By Example Tony Wat 9 October 2002.
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 Unit 6 November 2. XSL –eXtensible Stylesheet Language –Basically a stylesheet for XML documents XSL has three parts: –XSLT –XPath –XSL-FO.
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.
Implementation of One Stop Search by XSLT By Dave Low University of Hong Kong 9-Dec-2003.
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents into Text Files Roger L. Costello XML Technologies.
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
XML Extensible Markup Language. Today: Imagine Cup –Wednesday, February 2nd from 6-8 pm in Lally Hall, Room 104, we will have a representative on campus.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
17 Apr 2002 XML Stylesheets Andy Clark. What Is It? Extensible Stylesheet Language (XSL) Language for document transformation – Transformation (XSLT)
Technical Track Session XML Techie Tools Tim Bornholt.
1 Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COT 6930 Advanced Internet Programming Dr. Roy Levow Day 2.
Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University
XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.
XML for E-commerce III Helena Ahonen-Myka. In this part... n Transforming XML n Traversing XML n Web publishing frameworks.
SDPL 2002Notes 7: Apache Cocoon1 7 XML Web Site Architecture Example: Apache Cocoon, a Web publishing architecture based on XML technology
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
1 cs XSL XSL is a standard that consists of three parts: XPath (navigation in documents) XPath was taught in the DB course, so it will not be.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
CIS 451: XSL Dr. Ralph Westfall February, Problems With XML no formatting capabilities contra formatting tags like, etc. in HTML CSS can be used.
WORKING WITH XSLT AND XPATH
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 4 - XML.
 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.
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
Set 8: XML, XPath, and XSLT (Chapters ,14.8) IT452 Advanced Web and Internet Systems Some XSLT examples derived from prior textbook: “Professional.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
The Information School at the University of Washington INFO 440: Information System Design Fall 2003 * Bob Boiko * MSIM Associate Chair XML Transforms.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Lecture 11 XSL Transformations (part 1: Introduction)
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
Yet more on XSLT. Regular expression handling in EXSLT We saw that the EXSLT extensions are divided into a group of modules, each of which has its own.
WEB APPLICATION DEVELOPMENT For More visit:
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
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.
1 cs XSL XSL is a standard that consists of three parts: XPath (navigation in documents) XPath was taught in the DB course, so it will not be.
School of Computing and Information Systems CS 371 Web Application Programming AJAX.
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
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.
XML Extensible Markup Language. Introduction to XML Text based format As JSON it’s mainly intended for data interchange (transport & store) Also widely.
More XML XPATH, XSLT CS 431 – February 23, 2005 Carl Lagoze – Cornell University.
 XSL – Extensible Style Sheet Language  XSLT – XSL Transformations › Used to transform XML documents to other formats,like HTML or other XML documents.
1 XMLXSL(T) and CSS NOEA/PQC (rev. fen) 2007 Stylesheets CSS:Cascading Style Sheets XSL(T):eXtended Stylesheet Language (Transformations)
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
JQUERY AND AJAX
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
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.
XML, XPATH, XSL Part IV. XSLT Extensible Stylesheet Language Transformations XSLT is used for converting XML to some other output or restructuring XML.
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
Beginning XML 4th Edition. Chapter 8: XSLT Chapter 8 Objectives How XSLT can be used to convert XML for presentation or restructure XML for business-to-business.
Session IV Chapter 14 – Chapter 14 – XSLThttp://
Unit 4 Representing Web Data: XML
Creating an XSLT Style Sheet for Formatting Data
XML Related Technologies
Tutorial 04 (cont’) Using XPath Patterns in an XSLT Style Sheet.
Displaying XML Data with XSLT
CS 371 Web Application Programming
ACG 4401 XSLT Extensible Stylesheet Language for Transformations
Chapter 7 Representing Web Data: XML
What is xMod? xMod is: a desktop application (at the moment!) which can transform a repository of XML into a completely finished website Paul Spence, Paul.
Presentation transcript:

Set 8.5: XSLT Continued IT452 Advanced Web and Internet Systems

XML with namespaces <rdf:RDF xmlns:rdf=" xmlns=" xmlns:dc=" > Planet web2.0thebook Aggregated content relevant to the upcoming book "Professional Web 2.0 Programming". <item rdf:about=" XForms Everywhere Alessandro Vernet recommends FireBug... evlist T05:56:16Z ajax debugger dom firefox javascript... Web 2.0 at Prague Eric van der Vlist will do a presentation about Web

Example 1: XML transformed by XSLT <rdf:RDF xmlns:rdf=" xmlns=" xmlns:dc=" > Planet web2.0thebook Aggregated content relevant to the upcoming book "Professional Web 2.0 Programming"....

Example 1: The XSLT (1_rss.xsl) <xsl:stylesheet xmlns:xsl=" xmlns:rdf=" xmlns:rss=" xmlns=" version="1.0" exclude-result-prefixes="rdf rss">

Status Check We have XML documents. We have XSLT stylesheets. We changed XML docs into entire XHTML pages. Let’s transform XML into a subpart of an XHTML page. –Use Javascript. Don’t create and tags, just create a or and insert it into the page.

Example 2: HTML inserts transformed XML Professional Web 2.0 Programming A page with some exciting content Web 2.0 offers developers substantial advantages if they design their web applications as service providers and service consumers. This change in architecture has opened up an incredible number of options for flexible design, creative reuse, and easier updates. There is, however a cost: doing this requires rethinking how to apply many traditional web development technologies, as well as adding some new ideas. Below is some content from elsewhere: This element should be replaced by JS. If you see this content, something went wrong with the XSLT!

Example 2: HTML inserts transformed XML var xml = null; var xsl = null; function transform (xmlFileName, xslFileName) { // Get the XML input data $.get(xmlFileName, function(data) { xml = data; insertXML(); }); // Get the XSLT file $.get(xslFileName, function(data) { xsl = data; insertXML(); }); } function insertXML() { // Make sure both AJAX requests have returned. if( xml != null && xsl != null ) { // Transform the XML via the XSLT var processor = new XSLTProcessor(); processor.importStylesheet(xsl); var newDocument = processor.transformToDocument(xml); // Replace part of original document with the new content var o = document.getElementById("planet"); var n = newDocument.getElementById("planet"); o.parentNode.replaceChild(n, o); // Reset the variables to null. xml = null; xsl = null; }

Example 3: Improved XSL... A page with some exciting content...

Example 3: Improved XSL <xsl:stylesheet xmlns:xsl=" xmlns:rdf=" xmlns:rss=" xmlns=" version="1.0" exclude-result-prefixes="rdf rss">... (more on next page)

Example 3: Improved XSL --> -->

Example 4: Nicer Looking XSL Output... A page with some exciting content...

Example 4: Nicer Looking XSL Output <xsl:stylesheet xmlns:xsl=" xmlns:rdf=" xmlns:rss=" xmlns=" version="1.0" exclude-result-prefixes="rdf rss">.... Get it!

Example 4: Nicer Looking XSL Output --> -->

Example 5: Simplified XSLT <xsl:stylesheet xmlns:xsl=" xmlns:rdf=" xmlns:rss=" xmlns=" version="1.0" exclude-result-prefixes="rdf rss">.... Get it!

Example 5: Simplified XSLT -->