当前位置: 首页 > 网络学院 > XML相关教程 > XSL-FO > XSL-FO simple-page-master 对象

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 simple-page-master 对象


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

Definition and Usage
定义和用法

The <fo:simple-page-master> object defines the size and shape of a page. There will be one named simple-page-master for each page layout.
<fo:simple-page-master>对象定义了一个页面的尺寸和形状。对于每个页面层来说,都包含一个指定的simple-page-master [简单页面主]。

A page can contain up to five regions: region-body, region-before, region-after, region-start, and region-end.
一个页面最多可以包含五个区域:region-body[主体区]、region-before[前区]、region-after[后区]、region-start[起始区]、region-end[终止区]。

The <fo:simple-page-master> will be referenced from a <fo:page-sequence-master> object or from a <fo:page-sequence> object.
<fo:simple-page-master>对象将从<fo:page-sequence-master>对象或<fo:page-sequence>对象中引用。


Syntax
语法

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

Properties
属性

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

Example 1
案例1

XSL-FO documents have a structure like this:
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>

Example 2
案例2

A "real" XSL-FO example:
一个现实中的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 W3Schools</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

The output from the code above would be something like this:
上述代码将输出下面的结果:

Hello W3Schools

 

 

 

 

 

 

 

 

 


评论 (0) All

登陆 | 还没注册?