WTA4 XSL - 3/16/2011 Extensible Stylesheet Language (XSL) 1...

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

View Full Document Right Arrow Icon
3/16/2011 1 1 Extensible Stylesheet Language (XSL) 2 Topics: b XSL s Learn how XSL can transform XML documents into other formats such as HTML. s XSL stylesheet consists of a set of rules called templates. s Use XSLT to output an XML source document into an XML result document. s Use XPATH expressions in matching patterns to locate parts of an XML document. s Sorting and filtering xml data (using XSLT). s Creating Conditional Statements.
Background image of page 1

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

View Full DocumentRight Arrow Icon
3/16/2011 2 3 Introduction b XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. b XSLT stands for XSL Transformations. b How to use XSLT to transform XML documents into other formats, like XHTML. b CSS = Style Sheets for HTML b XSL = Style Sheets for XML b XSL can also be used to format data based on its value ex: to display negative numbers in a financial report in red. 4 XSL consists of three parts b XSLT s a language for transforming XML documents into XHTML. b Xpath s a language used by XSLT to locate elements and/or attributes within an XML documents b XSL-FO s a language for specifying formatting properties for rendering the XML documents
Background image of page 2
3/16/2011 3 5 XSL b XSL can filter and sort XML data using the criteria you define, as well as format its display based on the value of the data itself. b When the data is output, you can use XSL to send your XML data to various devices, including handheld devices, print, or voice output. 6 XSLT Processing reformatted.xsl XSLT Stylesheet mydocument.xml (XML Document) reformatted.xml (Reformatted XML Document) XSLT Processor
Background image of page 3

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

View Full DocumentRight Arrow Icon
3/16/2011 4 7 XSLT Processing b XSLT is used to transform XML Documents with XSL. b Can transform XML to XHTML format to be recognized by the browser, XSLT does this by converting each XML element into an XHTML element. b XSLT is a template-based programming language. XSLT Template b It can introduce new XML elements into the output document it creates, or remove others. b Change the order of elements and choose which to display and which to hide. b Create multiple views of the same source document to let your data be displayed on a broad variety of devices. b Summary: XSLT lets different kinds of software applications exchange XML-enabled data with one another. 8
Background image of page 4
5 XML Source Tree into XML Result Tree <staffdirectory> <employee> <firstname>Lisa</firstname> <lastname>Derik</lastname> </employee> <employee> <firstname>Bill</firstname> <lastname>Stark</lastname> </employee> </staffdirectory> <table> <tr> <th>First Name</th> <th>Last Name</th> </tr> <tr> <td>Lisa</td> <td>Derik</td> </tr> <tr> <td>Bill</td> <td>Stark</td> </tr> </table> 9 Working b For XSLT transformation s Two documents required XML source document and an XSLT stylesheet to create a single result document. b
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/04/2011 for the course IT 103 taught by Professor Php during the Spring '11 term at University of Mumbai.

Page1 / 16

WTA4 XSL - 3/16/2011 Extensible Stylesheet Language (XSL) 1...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online