XSL-FO ແລະ XSLT

XSL-FO ແລະ XSLT ສາມາດຊ່ວຍເຮັດກັນຕົວຕອນ.

ຍັງຈື່ວ່າມີຫຍັງນີ້ຫລືບໍ່?

<fo:block
    font-size="14pt" font-family="verdana" color="red"
    space-before="5mm" space-after="5mm">
W3School
</fo:block>
<fo:block
    text-indent="5mm"
    font-family="verdana" font-size="12pt"
    space-before="5mm" space-after="5mm">
At CodeW3C.com 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:

This example is from the section on XSL-FO block area.

Help from XSLT

Remove XSL-FO information from the document:

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

ເພີ່ມ XSLT ການປ່ຽນປ່າຍ:

<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"
    space-before="5mm" space-after="5mm">
    <xsl:apply-templates/>
</fo:block>
</xsl:template>

ຜົນການສ້າງອາດເປັນດຽວກັນ: