当前位置: 首页 > 网络学院 > XML相关教程 > XSL-FO > XSL-FO 表格

XSL-FO
XSL-FO 介绍
XSL-FO 文档
XSL-FO 区域
XSL-FO 输出
XSL-FO 流程
XSL-FO 页面
XSL-FO 块状区域
XSL-FO 列表
XSL-FO 表格
XSL-FO 和 XSLT
XSL-FO 软件
XSL-FO 参考资料

XSL-FO 表格


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 623 ::
收藏到网摘: n/a

XSL-FO uses the <fo:table-and-caption> element to define tables.
XSL-FO 使用<fo:table-and-caption>元素定义表格。


XSL-FO Tables
XSL-FO 表格

The XSL-FO table model is not very different from the HTML table model.
XSL-FO 的表格模式和HTML表格模式相差不大。

There are nine XSL-FO objects used to create tables:
下面列举9个可以用于创建表格的XSL-FO对象:

  • fo:table-and-caption
  • fo:table
  • fo:table-caption
  • fo:table-column
  • fo:table-header
  • fo:table-footer
  • fo:table-body
  • fo:table-row
  • fo:table-cell

XSL-FO uses the <fo:table-and-caption> element to define a table. It contains a <fo:table> and an optional <fo:caption> element.
XSL-FO使用<fo:table-and-caption>元素来定义一张表格。它包含了一个<fo:table>元素和一个可选择的<fo:caption>元素。

The <fo:table> element contains optional <fo:table-column> elements, an optional <fo:table-header> element, a <fo:table-body> element, and an optional <fo:table-footer> element. Each of these elements has one or more <fo:table-row> elements, with one or more <fo:table-cell> elements:
<fo:table>元素包含了几个可选择的<fo:table-column>元素,一个可选择的<fo:table-footer>元素。这些元素都包含一个或多个的<fo:table-row>元素以及一个或多个的<fo:table-cell>元素:

<fo:table-and-caption>
<fo:table>

<fo:table-column column-width="25mm"/>
<fo:table-column column-width="25mm"/>

<fo:table-header>
<fo:table-row>
<fo:table-cell>

<fo:block font-weight="bold">Car</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-weight="bold">Price</fo:block>

</fo:table-cell>
</fo:table-row>
</fo:table-header>

<fo:table-body>
<fo:table-row>
<fo:table-cell>

<fo:block>Volvo</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>$50000</fo:block>
</fo:table-cell>

</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>SAAB</fo:block>
</fo:table-cell>

<fo:table-cell>
<fo:block>$48000</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>

</fo:table>
</fo:table-and-caption>

The output from this code would something like this:
上述代码将输出如下结果:

Car Price
Volvo $50000
SAAB $48000

评论 (0) All

登陆 | 还没注册?