XSL-FO 用於格式化供輸出的 XML 資料。

XSL-FO 文件 語法

XSL-FO 文件是帶有輸出資訊的 XML 檔案。

XSL-FO 文件儲存在以 .fo 或 .fob 為檔案副檔名的檔案中。您也可以把 XSL-FO 文件儲存為以 .xml 為副檔名的文件,這樣做的話可以讓 XSL-FO 文件更容易被 XML 編輯器存取。

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>