1 / 12

Technology Reviews : XSL

Technology Reviews : XSL. 20031042 Park, Ho-gun. What is XSL. Extensible Style sheet Language An XML-based language used to create to style sheets. What it does. Define layout of the output document Define font and alignment of text

argus
Download Presentation

Technology Reviews : 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. Technology Reviews:XSL 20031042 Park, Ho-gun

  2. What is XSL • Extensible Style sheet Language • An XML-based language used to create to style sheets

  3. What it does • Define layout of the output document • Define font and alignment of text • Define where to get the data from within the input document • Rearrange elements • Source tree( input document ) • Result tree( output document )

  4. Composition of XSL • A transformation language • which is named XSLT • switch a tag to another tag • EX. XSL -> HTML, XML -> HTML + CSS • Rearrange element and add contents • A language used to describe XML document for display • XSL Formatting Objects • More powerful display

  5. CSS and XSL • Impose a standard style on a whole document • but, there are several differences.

  6. CSS Only define property XSL change order of elements for display iterative and selective process to elements add contents Differences:CSS and XSL

  7. CSS Selector and Properties selector { properties } XSL Pattern and Formatting object <xsl:template pattern="pattern"> <formatting objects/></xsl:template> Differences:CSS and XSL • example • quote { display: block; font-size: 90%; margin-left: 0.5in; margin-left: 0.5in } • example • <xsl:template pattern="quote"> <fo:block font-size="90%" indent-start="0.5in" indent-end="0.5in"> <xsl:process-children/> </fo:block></xsl:template>

  8. How do XSLT style sheets works? • XSLT style sheets are built on structures called templates • A template specifies what to look for in the source tree, and what to put into the result tree. • XSLT is written in XML • There are special XSLT elements and attributes

  9. namespace Printing form • <?xml version="1.0" encoding="euc-kr" ?> • <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> • <xsl:output method="html" version="4.0" encoding="euc-kr" /> • <xsl:decimal-format NaN=“none" /> • <xsl:template match="/"> • <html> • <head> • <title><xsl:text>Book list</xsl:text></title> • <link rel="stylesheet" type="text/css" href="books.css" /> • </head> • <h1><xsl:text>Book table</xsl:text></h1> • <table border="1"> • <tr> • <th>No.</th> • <th>ISBN code</th> • <th>Name</th> • <th>Company</th> • <th>Price</th> • <th>date</th> • </tr> • <xsl:apply-templates select="books" /> • </table> • </html> • </xsl:template> css Call <xsl:template match=“books”>~</xsl:templete>

  10. Example 1

  11. Example 2

More Related