xsl

7
XSL COSC643 Internet Supply Chain Management Sungchul Hong

Upload: randall-randall

Post on 31-Dec-2015

20 views

Category:

Documents


0 download

DESCRIPTION

XSL. COSC643 Internet Supply Chain Management Sungchul Hong. XSL. Extensible Stylesheet Language XSL XSLT (Transformation) XSLFO (Formatting Objects) Similar to CSS. It worked! - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: XSL

XSL

COSC643

Internet Supply Chain Management

Sungchul Hong

Page 2: XSL

XSL

• Extensible Stylesheet Language

• XSL– XSLT (Transformation)– XSLFO (Formatting Objects)

• Similar to CSS

Page 3: XSL

<?xml version= "1.0" ?>

<?xml-stylesheet type="text/xsl" href="test.xsl"?>

<document>

<message>

It worked!

</message>

<message> second line </message>

</document>

Page 4: XSL

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version= "1.0" >

<xsl:template match= "/" >

<html>

<body>

<h1><xsl:value-of select= "document/message" /></h1>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

Page 5: XSL

Templates

• Templates are used to decide what element should be output, and how.

<xsl:template match=“/”>

<xsl:value-of select=“.”/>

</xsl:tempalte>

Page 6: XSL

xsl:value-of

• Select a specific node: “node name”

• Select all the nodes: “.”

<xsl:template match=“/”>

<xsl:value-of select=“.”/>

</xsl:tempalte>

Page 7: XSL

xsl:apply-templates/

• Telling the processor that after it’s finished applying this template, it should go on and see whether there are any other templates that apply.