XSLT transformations Or how to get your XML to become HMTL.

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

CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
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.
XSL XSLT and XPath 11-Apr-17.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
XML Extensible Markup Language Standard supported by W3C (World Wide Web Consortium) HTML – End user oriented (presentation) XML – Application oriented.
System design methods Or “there is not only XML”.
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.
WML/HTML and XML Multiplatform Applications. Agenda XML – History and purpose What have HTML, WML and XML got to do with each other Why useful for multiplatform.
XSLT transformations Or how to get your XML to become HMTL.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Introduction to XML Rashmi Kukanur. XML XML stands for Extensible Markup Language XML was designed to carry data XML and HTML designed with different.
17 Apr 2002 XML Stylesheets Andy Clark. What Is It? Extensible Stylesheet Language (XSL) Language for document transformation – Transformation (XSLT)
Philadelphia Area SharePoint User Group Using XSLT with Custom Web Parts Rick Wise RJB Technical Consulting
Introduce of XML Xiaoling Song CS157A. What is XML? XML stands for EXtensible Markup Language XML stands for EXtensible Markup Language XML is a markup.
XSLT XSLT: eXtensible Stylesheet Language for Transformations - a language for transforming XML documents into any text- based format (e.g. HTML, plain.
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.
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
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.
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.
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.
CSC 330 E-Commerce Teacher Ahmed Mumtaz Mustehsan Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad GM-IT CIIT Islamabad CIIT Virtual Campus, CIIT COMSATS Institute.
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
Another PillowTalk Presentation  2004 Dynamic Systems, Inc. Introduction to XML for SOA Lee H. Burstein,
Session II Chapter 2 – Chapter 2 – XSLhttp://
Demystifying the eXtensible Markup Language Nick Roberts & Jim Few
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.
DSpace UI Alexey Maslov. DSpace in general A digital library tool useful for storage, maintenance, and retrieval of digital documents Two types of interaction:
XHTML,XML M.Abdullah Mrian. What is the XHTML Why XHTML ?
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
1 T RANSFORMING XSLT 2.0 T O XQ UERY 1.0 Advanced Database SystemsCOSC282 G OWRI S HANKAR D ARA T EAM M EMBERS D ARREL M AZZARI A LBIN L AGA A DITYA T.
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
Li Tak Sing COMPS311F. XPath XPath is a simple language that allows you to write expressions to refer to different parts of an XML document. We will learn.
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.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
CIS 375—Web App Dev II XSL. 2 XSL Introduction XSL stands for _____________________________. XSL is the language used for manipulating and displaying.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
Lecture 11 XSL Transformations (part 1: Introduction)
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
CIS 375—Web App Dev II ASP.NET 8 More Binding. 2 The Repeater ControlThe Repeater Control 1 The Repeater control is used to display a repeated list of.
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.
XML technologies for text encoding Tamás Váradi
XML Presented by Kushan Athukorala. 2 Agenda XML Overview Entity References Elements vs. Atributes XML Validation DTD XML Schema Linking XML and CSS XSLT.
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
Introduction XML stands for eXtensible Markup Language. Designed to transport and store data; not to display it XML is similar to HTML, but tags are not.
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.
XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman.
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.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
WEB 431 UOP Course Tutorial For more course tutorials visit
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://
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Lesson 4 Creating a page with Web Matrix
Unit 6 - XML Transformations
Presentation transcript:

XSLT transformations Or how to get your XML to become HMTL

Agenda What is XSL and XSLT How do I use them Example usage

What is XSL and XSLT Recap XSL – EXtensible Stylesheet Language XSLT - EXtensible Stylesheet Language Transformation One is the mechanism to store the structuring of the document The other is the method of applying that

XSLT XSLT transforms an XML document into another document XSLT uses XPath to navigate in XML documents XSLT is a W3C Standard

Why? You might have an XML document in one format (the supplier) and it is needed in another structure by another party (the manufacturer) You might want to convert from XML to another XML type language such as HTML or WML

How does it work? You create the structure of the new document You find the bits of the original document that you wish to extract information from You then place the original data into the new structure by transforming the data

XSLT files Start with an XML declaration Then choosing the node(s) that you wish to use Then state your formatting instructions Place your data in the relevant area For example

Base xml file Empire Burlesque Bob Dylan USA Columbia Hide your heart Bonnie Tyler UK CBS Records

XSL file My CD Collection Title Country HTML formatting XSL code to choose area of XML file XSL code to choose node to display

Output

How to filter the list Because you use XPATH to access nodes you can filter data e.g. Will list every cd that costs over £10

Templates If you want to break down the formatting of a page to individual efforts you can use templates The command is This can allow you to apply formatting to individual elements e.g

My CD Collection : :

Write an XML file using an XSL file in ASP <% 'Load XML xml = Server.CreateObject("Microsoft.XMLDOM").async = false.load(Server.MapPath("cdcatalog.xml")) 'Load XSL xsl = Server.CreateObject("Microsoft.XMLDOM").async = false.load(Server.MapPath("cdcatalog.xsl")) 'Transform file.Write(xml.transformNode(xsl)) %>

Or do it the easy way Drag an XML control onto the page Set the properties… You’re done

Server-side tips Do not need the xsl:stylesheet processing instruction in the XML file XML can come from a data source or even a dynamic request XML object properties can still be manipulated in code to deal with user-agent for example

System design methods Or “there is not only XML”

Agenda XML approach Standard system approach Benefits and drawbacks The golden key

Standard systems Database SQL Application server XML XSLT WAP Web ITV XSL

XML based systems XML datasource ASP.NET/ PHP/ CF XSLT WAP Web ITV XSL

Benefits Code based systems Re-use already developed skills iin PHP/SQL/ASP etc Lots of support in this area XML based systems one less area to code in consistency of data

Drawbacks Code based systems Extra layers of code being developed e.g. SQL/PHP etc Not most efficient use of server resources? XML based systems Not a hugely developed approach Not a widespread proven method

The Golden Key Take a look at online seminar 9