非常教程

XSLFO 教程教程

XSL-FO simple-page-master 对象

XSL-FO simple-page-master 对象

XSL-FO simple-page-master 对象

XSL-FO simple-page-master 对象

XSL-FO 参考手册

定义和用法

The <fo:simple-page-master> 对象定义了一个页面的尺寸和形状。对于每个页面布局来说,都包含一个指定的 simple-page-master。

一个页面最多可以包含五个区域:region-body、region-before、region-after、region-start、region-end。

<fo:simple-page-master> 对象将从 <fo:page-sequence-master> 对象或<fo:page-sequence> 对象中引用。


语法

<fo:simple-page-master>
<!--
Contents:(region-body,region-before?,
region-after?,region-start?,region-end?)
-->
</fo:simple-page-master>

属性

属性
end-indent
margin-bottom
margin-left
margin-right
margin-top
master-name
page-height
page-width
reference-orientation
space-after
space-before
start-indent
writing-mode

实例 1

XSL-FO 文档结构如下所示:

<?xml version="1.0" encoding="ISO-8859-1"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
<!-- Page template goes here -->
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
<!-- Page content goes here -->
</fo:page-sequence>

</fo:root>

实例 2

一个"真实的" XSL-FO 实例:

<?xml version="1.0" encoding="ISO-8859-1"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block>Hello verydoc</fo:block>
</fo:flow>
</fo:page-sequence>

</fo:root>

上面代码的输出如下所示:

Hello verydoc



XSL-FO simple-page-master 对象

XSL-FO 参考手册
XSL-FO simple-page-master 对象
XSLFO 教程

XSL-FO,即可扩展样式表语言格式化对象(Extensible Stylesheet Language Formatting Objects),是用于格式化 XML 数据的语言。XSL-FO 是一个 W3C 推荐标准。

XSLFO 教程目录

1.XSLT 教程
2.XSL-FO 教程
3.XSLT <xsl:value-of> 元素
4.XSLT <xsl:template> 元素
5.XSLT 转换
6.XSLT 浏览器
7.XSLT 简介
8.XSL 语言
9.XSLT 在服务器端
10.XSLT 在客户端
11.XSLT <xsl:apply-templates> 元素
12.XSLT <xsl:choose> 元素
13.XSLT <xsl:if> 元素
14.XSLT <xsl:sort> 元素
15.XSLT <xsl:for-each> 元素
16.XSLT 总结
17.XML 编辑器
18.XSLT – 编辑 XML
19.XSLT <xsl:comment> 元素
20.XSLT <xsl:choose> 元素
21.XSLT <xsl:call-template> 元素
22.XSLT <xsl:attribute-set> 元素
23.XSLT <xsl:attribute> 元素
24.XSLT <xsl:apply-templates> 元素
25.XSLT <xsl:apply-imports> 元素
26.XSLT 实例
27.XSLT <xsl:import> 元素
28.XSLT <xsl:if> 元素
29.XSLT <xsl:for-each> 元素
30.XSLT <xsl:fallback> 元素
31.XSLT <xsl:element> 元素
32.XSLT <xsl:decimal-format> 元素
33.XSLT <xsl:copy-of> 元素
34.XSLT <xsl:copy> 元素
35.XSLT <xsl:otherwise> 元素
36.XSLT <xsl:number> 元素
37.XSLT <xsl:namespace-alias> 元素
38.XSLT <xsl:message> 元素
39.XSLT <xsl:key> 元素
40.XSLT <xsl:include> 元素
41.XSLT <xsl:variable> 元素
42.XSLT <xsl:value-of> 元素
43.XSLT <xsl:text> 元素
44.XSLT <xsl:template> 元素
45.XSLT <xsl:stylesheet> 和 <xsl:transform> 元素
46.XSLT <xsl:sort> 元素
47.XSLT <xsl:processing-instruction> 元素
48.XSLT <xsl:preserve-space> 和 <xsl:strip-space> 元素
49.XSLT <xsl:param> 元素
50.XSLT <xsl:output> 元素
51.XSLT key() 函数
52.XSLT generate-id() 函数
53.XSLT function-available() 函数
54.XSLT format-number() 函数
55.XSLT element-available() 函数
56.XSLT document() 函数
57.XSLT current() 函数
58.XSLT 元素参考手册
59.XSLT <xsl:with-param> 元素
60.XSLT <xsl:when> 元素
61.XSL-FO 流
62.XSL-FO 输出
63.XSL-FO 区域属性
64.XSL-FO 文档
65.XSL-FO 简介
66.XSLT 函数
67.XSLT unparsed-entity-uri() 函数
68.XSLT system-property() 函数
69.XSL-FO 软件
70.XSL-FO 与 XSLT
71.XSL-FO 表格
72.XSL-FO 列表
73.XSL-FO block 对象
74.XSL-FO bidi-override 对象
75.XSL-FO basic-link 对象
76.XSL-FO flow 对象
77.XSL-FO float 对象
78.XSL-FO external-graphic 对象
79.XSL-FO declarations 对象
80.XSL-FO conditional-page-master-reference 对象
81.XSL-FO color-profile 对象
82.XSL-FO character 对象
83.XSL-FO block-container 对象
84.XSL-FO inline-container 对象
85.XSL-FO inline 对象
86.XSL-FO initial-property-set 对象
87.XSL-FO footnote-body 对象
88.XSL-FO footnote 对象
89.XSL-FO list-item-label 对象
90.XSL-FO list-item-body 对象
91.XSL-FO list-item 对象
92.XSL-FO list-block 对象
93.XSL-FO leader 对象
94.XSL-FO layout-master-set 对象
95.XSL-FO instream-foreign-object 对象
96.XSL-FO multi-case 对象
97.XSL-FO marker 对象
98.XSL-FO region-before 对象
99.XSL-FO region-after 对象
100.XSL-FO page-sequence-master 对象