1 / 7

XSL

XSL. COSC643 Internet Supply Chain Management Sungchul Hong. XSL. Extensible Stylesheet Language XSL XSLT (Transformation) XSLFO (Formatting Objects) Similar to CSS. <?xml version= "1.0" ?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <document> <message> It worked!

Download Presentation

XSL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XSL COSC643 Internet Supply Chain Management Sungchul Hong

  2. XSL • Extensible Stylesheet Language • XSL • XSLT (Transformation) • XSLFO (Formatting Objects) • Similar to CSS

  3. <?xml version= "1.0" ?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <document> <message> It worked! </message> <message> second line </message> </document>

  4. <?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>

  5. Templates • Templates are used to decide what element should be output, and how. <xsl:template match=“/”> <xsl:value-of select=“.”/> </xsl:tempalte>

  6. xsl:value-of • Select a specific node: “node name” • Select all the nodes: “.” <xsl:template match=“/”> <xsl:value-of select=“.”/> </xsl:tempalte>

  7. 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.

More Related