Relevance to XSLT and XSL

CSS has been one of the influences in the development of XSL. Indeed, as stated above, XSL has now adopted the names of properties defined in CSS. It is therefore possible to use existing experience of CSS, or a CSS textbook, to explain the behaviour and identify the attribute name needed in XSL to achieve a particular effect. For example, in CSS the property name 'font-size' defines the size of the text to present. This name has been adopted in XSL to achieve the same effect:

{ ... font-size: 12pt ... }


<xsl:inline font-size="12pt">...</xsl:inline>

When using XSLT to create HTML documents from XML documents, the HTML document can be enhanced by including in-line CSS properties. For example, the background colour of a note may depend on the importance of the note:

<xsl:template match="note[@type='danger']">
  <P STYLE="background-color:red">
    <xsl:apply-templates/>
  </P>
</xsl:template>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.85.33