XSL-FO andXSLT


XSL-FO and XSLT can help each other.


Remember this example?

<fo:block font-size="14pt" font-family="verdana" color="red"
space-before="5mm" space-after="5mm">
EXAMPLE
</fo:block>

<fo:block text-indent="5mm" font-family="verdana" font-size="12pt">
At EXAMPLE you will find all the Web-building tutorials you
need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.
</fo:block>

Result:

EXAMPLE

At EXAMPLE you will find all the Web-building tutorials you need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.

The example above comes from the chapter about XSL-FO block areas.


Help from XSLT

Remove XSL-FO information from the document:

<header>EXAMPLE</header>

<paragraph>At EXAMPLE you will find all the Web-building tutorials you
need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.
</paragraph>

Add XSLT transformation:

<xsl:template match="header">
<fo:block font-size="14pt" font-family="verdana" color="red"
space-before="5mm" space-after="5mm">
<xsl:apply-templates/>
</fo:block>
</xsl:template>

<xsl:template match="paragraph">
<fo:block text-indent="5mm" font-family="verdana" font-size="12pt">
<xsl:apply-templates/>
</fo:block>
</xsl:template>

The result is the same:

EXAMPLE

At EXAMPLE you will find all the Web-building tutorials you need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.


Other Extensions