XSL-FO and XSLT

## XSLFO Tutorial

XSLFO HOME XSLFO Intro XSLFO Documents XSLFO Areas XSLFO Output XSLFO Flow XSLFO Pages XSLFO Blocks XSLFO Lists XSLFO Tables XSLFO & XSLT XSLFO Software

## XSLFO Reference

XSLFO Objects

# XSL-FO and XSLT

« Previous
Next Chapter »

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">
W3Schools
</fo:block>
<fo:block text-indent="5mm" font-family="verdana" font-size="12pt">
At W3Schools 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:

W3Schools At W3Schools 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 is from the chapter about XSL-FO Blocks.

## With a Little Help from XSLT

Remove the XSL-FO information from the document:

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

Add an 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>

And the result will be the same:

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

« Previous
Next Chapter »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE