{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

13xsl-2up - 13 XSL 30 Sept 2010 CSCC09F Programming on the...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
13 XSL 30 Sept, 2010 CSCC09 Programming on the Web 1 13 XSLT CSCC09 Programming on the Web 1 eXtensible Stylesheet Language (XSL) usage, formatting, transformations, templates CSCC09F Programming on the Web 13 XSLT CSCC09 Programming on the Web 2 XSL Components boxshadowdwn XSLT circleshadowdwn An XML vocabulary for transforming an XML document into another (text) document boxshadowdwn " Unlike with a programming language, you don't need to be a programmer to successfully describe how to transform your information. XSLT implements transformation ‘by example’, not just ‘by program logic’, and builds in support for the kinds of transformation typically needed to present information.” circleshadowdwn would that life were so easy boxshadowdwn XPath circleshadowdwn A language for addressing parts of XML documents (covered in separate slide set) boxshadowdwn XSL Formatting Objects (FO) circleshadowdwn an XML vocabulary to define XML presentation circleshadowdwn designed for very high quality (e.g. print) circleshadowdwn not covered in this course
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
13 XSL 30 Sept, 2010 CSCC09 Programming on the Web 2 13 XSLT CSCC09 Programming on the Web 3 XSL Applications 13 XSLT CSCC09 Programming on the Web 4
Background image of page 2
13 XSL 30 Sept, 2010 CSCC09 Programming on the Web 3 13 XSLT CSCC09 Programming on the Web 5 XSLT Structure boxshadowdwn XSLT Namespace http://www.w3.org/1999/XSL/Transform boxshadowdwn 1999 refers to the year the URI was allocated by W3C, not to the version of XSLT boxshadowdwn Stylesheet root element <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> or (these 2 forms are synonymous) <xsl:transform version="2.0" …> boxshadowdwn Combining stylesheets <xsl:include href=“uri-reference " /> (as if defined here) <xsl:import href=“uri-reference"/> (importer has priority, can override imported definitions) 13 XSLT CSCC09 Programming on the Web 6 boxshadowdwn Consider the important application of transforming an XML document to XHTML, for display purposes. boxshadowdwn This could happen in various places: circleshadowdwn In a Web server . A CGI script or Servlet might convert XML documents stored on the server to XHTML documents that are sent to the client via HTTP. circleshadowdwn In a Web browser . An XSL-enabled browser may convert XML downloaded from the server to XHTML, prior to display. Current versions of Firefox and IE support a subset of XSLT. circleshadowdwn In a standalone program . XML stored in or generated from a database, say, may be converted to XHTML before placing it in the server’s document directory (e.g. Saxon invoked on server). Transforming XML to XHTML
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
13 XSL 30 Sept, 2010 CSCC09 Programming on the Web 4 13 XSLT CSCC09 Programming on the Web 7 Invoking XSLT Processor boxshadowdwn server side (could be static, e.g. makefile, or dynamic, e.g. invoked by CGI like saxon.cgi, or by a Servlet) circleshadowdwn java –jar /courses/webspace/cscc09f10/prof/lib/saxon8.jar file.xml file.xsl boxshadowdwn client side (run XSLT on the client) circleshadowdwn PI for XSL included in XML document file.xml: <?xml-stylesheet type=“text/xsl” href=“file.xsl” ?>
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}