Extensible Stylesheet Language for Transformations XSLT An introduction.

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
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.
Advanced XSLT. Branching in XSLT XSLT is functional programming –The program evaluates a function –The function transforms one structure into another.
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.
What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
XSLT 11-Apr-17.
Standards and Increasing Maintainability on Web- based Systems James Eaton SE4112/16/2006.
1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
XML: Styling and Transformation Dr Andy Evans. Multiple views Nice thing is that this data can be styled in lots of different ways using stylesheets.
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.
Developing Interfaces and Interactivity for DSpace with Manakin Part 5: Introduction to Manakin’s Theme Tier Eric Luhrs Digital Initiatives Librarian,
XSL XSLT and XPath 11-Apr-17.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Lecture 10. Back to the table example We can now return to considering in detail the first XSLT style-sheet we saw –The one which, when applied to the.
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.
Advanced Technical Writing 2006 Session #3. Today in Class… ► Teams pitch poster concepts:  Meet with your editorial team, show us how your material.
XML, XSL, XSLT, XHTML and others By Sean Hunter. Why XML?  XML was created to be a quick and easy way to provide structured data over the web.  Existing.
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
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.
XSLT 1. C ONTENTS XSLT and uses XSLT example Simple XML How XSLT works? Template-match Value-of For-each and sort If Choose-when Apply-templates Where.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
HTML & CSS A brief introduction. OUTLINE 1.What is HTML? 2.What is CSS? 3.How are they used together? 4.Troubleshooting/Common problems 5.More resources.
XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
ColdFusion’s XML Capabilities Maryland CFUG April 12, 2005 Presented by Doug Ward.
Introduction technology XSL. 04/11/2005 Script of the presentation Introduction the XSL The XSL standard Tools for edition of codes XSL Necessary resources.
Introduction to XSLT By Ed Rosenthal And Dave Pion.
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.
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.
Another PillowTalk Presentation  2004 Dynamic Systems, Inc. Introduction to XML for SOA Lee H. Burstein,
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
XML: The Changing Phase of e-Documentation Jyothi Jandhyala.
Session II Chapter 2 – Chapter 2 – XSLhttp://
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.
XHTML,XML M.Abdullah Mrian. What is the XHTML Why XHTML ?
These Questions are copied from
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
EXtensible Markup Language (XML) and Documentation --ManojBokil -- Manoj Bokil.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
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 "
Extensible Stylesheet Language Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University XSL-FO XSLT.
The Information School at the University of Washington INFO 440: Information System Design Fall 2003 * Bob Boiko * MSIM Associate Chair XML Transforms.
Lecture 11 XSL Transformations (part 1: Introduction)
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
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.
Introduction to Markup David J. Birnbaum University of Pittsburgh Slavic Digital Text Workshop University.
Using XML to store Descriptive Metadata Richard Murphy Rosarie O’Riordan Central Statistics Office Ireland.
Advanced Technical Writing 2006 Session #4. Today in Class… ► Meet with your editorial team, refine/post deliverables ► Send URL for deliverables to Bill.
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
Information Design Trends Unit 4: Sources and Standards Lecture 3: A Brief Introduction to XML.
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.
University of Nottingham School of Computer Science & Information Technology Introduction to XML 2. XSLT Tim Brailsford.
XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Advanced Technical Writing 2006 Session #3. Today in Class… ► Show-n-tell your CSS Objects from exercise 1 ► Meet with your editorial team, refine/post.
XML Introduction to XML Extensible Markup Language.
October 19th 2016 Meeting Minutes.
XSL XSLT and XPath 24-Feb-19.
Presentation transcript:

Extensible Stylesheet Language for Transformations XSLT An introduction

Why ‘transformations’? XML document XML document XML document HTML document XML document HTML document

Why ‘transformations’? XML document XML document HTML document Corpus search results More readable presentations

(1) Take an XML file… e.g., a play…. The Two Gentlemen of Verona Text placed in the public domain by Moby Lexical Tools, SGML markup by Jon Bosak, XML version by Jon Bosak, This work may be freely copied and distributed worldwide. Dramatis Personae DUKE OF MILAN, Father to Silvia. VALENTINE PROTEUS the two Gentlemen. …

(2) Take an XSLT file…

(2) Take an XSLT file… From the top of an XML file(“/”), go looking for any place where we can find a TITLE element (“//TITLE”). XPath

(2) Take an XSLT file… Whenever we find a TITLE element (“TITLE”), take the value of that ‘node’ (“.”) and put it in our output document

… (3) apply the XSLT file to the XML file of the play …

(4) And hey presto…. … all the TITLES from the play…

… that is not very readable though, so we can …

(5) … add some HTML

(5) … add some HTML

(5) … add some HTML Search Results

(5) … add some HTML Search Results HTML

… (6) apply the XSLT file to the XML file of the play again…

… and we get …

We can also start making it fancier… Search Results Our search results This time we wrap the HTML code for a table around our XSLT expressions…

… (7) apply the XSLT file to the XML file of the play again …

… and we get …

Lets make this more useful… Task: select all the lines in the play that were spoken by some particular character…

How do we do this? Look in the XML file to see how speaker turns are represented Write a proper XPath expression to pick out just the turns that we are interested in Put that XPath expression in place of our “TITLE” XPath in the example XSLT file Apply the XSLT file to the play again

The DTD gives us the kinds of XPath expressions that we need /PLAY

The DTD gives us the kinds of XPath expressions that we need /PLAY /ACT

The DTD gives us the kinds of XPath expressions that we need /PLAY /ACT/SCENE

The DTD gives us the kinds of XPath expressions that we need /PLAY /ACT/SCENE/SPEECH

The DTD gives us the kinds of XPath expressions that we need /PLAY /ACT/SCENE/SPEECH

Try #1 Search Results Our search results

Result #1

Try #2

Result #2

A variant of Try #2

Try #3

Result #3

As final icing on the cake… Lets replace the redundant name with the title of the scene that the turns occur in!

A solution…

And one more complex example still… The turns of SPEED plus the preceding turn to show the dialogue context… The stylesheet is on the course website

There is very little one cannot do with an XSLT for transforming documents Although it can be quite difficult sometimes to see how!