YouTip LogoYouTip

Xslfo Xslt

XSL-FO with XSLT

XSL-FO with XSLT

- Learn to Code, Build Your Dream!

XSLFO Tutorial

XSLFO Reference Manual

XSL-FO with XSLT

XSL-FO and XSLT can complement each other.

Remember This Example?

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

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


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

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

Help from XSLT

Remove XSL-FO information from the document:

<header></header>

<paragraph>At  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:


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

← Xslfo SoftwareXslfo Tables β†’