自强学堂
自强学堂:学习、分享、让你更强!
XSL-FO 教程HTMLCSSJAVASCRIPTJQUERYSQLPHPBOOTSTRAPANGULARXML
 

XSL-FO 与 XSLT

XSL-FO 与 XSLT 可彼此互助。


还记得这个实例吗?

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

结果:

自强学堂

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

上面的实例来自于有关 XSL-FO 块区域的那一章节。


来自 XSLT 的帮助

从文档移除 XSL-FO 信息:

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

添加 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">
<xsl:apply-templates/>
</fo:block>
</xsl:template>

产生的结果是相同的:

自强学堂

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


为什么有广告?:广告收入是作者继续投入更多业余时间的动力,也可以补贴服务器等的花费,本站也不会阻止屏蔽广告插件,请大家理解!