当前位置: 首页 > 网络学院 > XML相关教程 > XSL-FO > XSL-FO root 对象
The <fo:root> object is the root (top) node for XSL-FO documents.
<fo:root>对象是XSL-FO文档的根(顶级)节点
The children of the <fo:root> object are a single <fo:layout-master-set> object (which holds all masters used in the document), an optional <fo:declarations> object, and one or more <fo:page-sequence> objects.
<fo:root>对象的子类是单个<fo:layout-master-set>对象(该对象保留了在文档中使用的所有页面主[master]),是一个可供选择的<fo:declarations>对象,以及是一个或多个<fo:page-sequence对象。
Note: An XSL-FO document can contain multiple <fo:page-sequences> (e.g. each chapter of a document could be a separate <fo:page-sequence> - this would allow chapter-specific content, such as the chapter title, to be placed within the header or footer).
注意:一个XSL-FO文档可以包含多个<fo:page-sequences>对象(如:文档的每个章节都可以作为一个独立的<fo:page-sequence>对象-它允许使用chapter-specific [具体的章节]内容,如:章节的标题,它可以被放置在页眉或页脚)。
<fo:root> <!-- Children:layout-master-set,declarations?, page-sequence+ --> </fo:root> |
属性 |
---|
media-usage |
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> |