The best XSL-FO and XSLT Tutorial In 2024, In this tutorial you can learn
Remember this example it?,Help from the XSLT,
XSL-FO and XSLT
XSL-FO and XSLT can help each other.
Remember this example it?
<fo:block
font-size="14pt" font-family="verdana" color="red"
space-before="5mm" space-after="5mm">
W3CSchool
</fo:block>
<fo:block
text-indent="5mm"
font-family="verdana" font-size="12pt">
At W3CSchool 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:
W3CSchool At W3CSchool 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 from that chapter on XSL-FO block area.
Help from the XSLT
XSL-FO is removed from the document:
<header>W3CSchool</header>
<paragraph>At W3CSchool 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:
W3CSchool At W3CSchool you will find all the Web-building tutorials you need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP. |