Duke CPS 116 - XSLT (8 pages)

Previewing pages 1, 2, 3 of 8 page document View the full content.
View Full Document

XSLT



Previewing pages 1, 2, 3 of actual document.

View the full content.
View Full Document
View Full Document

XSLT

53 views


Pages:
8
School:
Duke University
Course:
Cps 116 - Introduction to Database Systems
Introduction to Database Systems Documents

Unformatted text preview:

XSLT CPS 116 Introduction to Database Systems Announcements October 25 2 Homework 3 due in 1 weeks Start early Project milestone 2 due in 2 weeks 3 XSLT XML to XML rule based transformation language Used most frequently as a stylesheet language An XSLT program is an XML document itself Current version is 2 0 W3C recommendation since January 2007 XSLT program XSLT processor Input XML Output XML Actually output does not need to be in XML in general 1 XSLT program 4 An XSLT program is an XML document containing Elements in the xsl namespace Elements in user namespace The result of evaluating an XSLT program on an input XML document the XSLT document where each xsl element has been replaced with the result of its evaluation Basic ideas Templates specify how to transform matching input nodes Structural recursion applies templates to input trees recursively Uses XPath as a sub language XSLT elements 5 Element describing transformation rules xsl template Elements describing rule execution control xsl apply templates xsl call template Elements describing instructions xsl if xsl for each xsl sort etc Elements generating output xsl value of xsl attribute xsl copyof xsl text etc XSLT example 6 Find titles of books authored by Abiteboul xml version 1 0 Standard header of an XSLT document xsl stylesheet xmlns xsl http www w3 org 1999 XSL Transform version 2 0 xsl template match book author Abiteboul booktitle xsl value of select title booktitle xsl template xsl stylesheet Not quite we will see why later 2 7 xsl template xsl template match book author Abiteboul booktitle xsl value of select title booktitle xsl template xsl template match match match match expr expr is the basic XSLT construct describing a transformation rule match expr is an XPath like expression specifying which nodes this rule applies to xsl value of select xpath expr evaluates xpath expr within the context of the node matching the template and converts the result sequence to a string booktitle and booktitle



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view XSLT and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view XSLT and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?