一个 simple-page-master 可以继承另一个 simple-page-master
我有两个母版页模板,我希望它们从第三个母版继承一些常见属性。这可以做到吗?下面是我正在尝试的示例。
<fo:layout-master-set>
<fo:simple-page-master master-name="page" page-width="8.5in"
page-height="11in" margin=".5in 1in 0in 1in"/>
<fo:simple-page-master master-name="first" master-reference="page">
<fo:region-before region-name="header" extent=".75in"/>
<fo:region-body region-name="body" margin-top=".5in" margin-bottom=".75in"/>
<fo:region-after region-name="footer" extent=".75in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="rest" master-reference="page">
<fo:region-body region-name="body" margin-top=".5in" margin-bottom=".75in"/>
<fo:region-after region-name="footer" extent=".75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
我试图从“页面”母版继承页面尺寸。
I have two master page templates and i'd like them to inherit some common properties from a 3rd master. Can this be done? Below is an example of what i'm attempting.
<fo:layout-master-set>
<fo:simple-page-master master-name="page" page-width="8.5in"
page-height="11in" margin=".5in 1in 0in 1in"/>
<fo:simple-page-master master-name="first" master-reference="page">
<fo:region-before region-name="header" extent=".75in"/>
<fo:region-body region-name="body" margin-top=".5in" margin-bottom=".75in"/>
<fo:region-after region-name="footer" extent=".75in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="rest" master-reference="page">
<fo:region-body region-name="body" margin-top=".5in" margin-bottom=".75in"/>
<fo:region-after region-name="footer" extent=".75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
I'm attempting to inherit the page dimensions from the "page" master.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,不可能那样“继承”。
fo:simple-page-master
元素不采用master-reference
属性(并且不能为空)。如果您使用 XSLT 生成 XSL-FO,您可能需要使用命名属性集(可重用的属性集合;XSLT 2.0,XSLT 1.0)。
No, it is not possible to "inherit" like that. A
fo:simple-page-master
element does not take amaster-reference
attribute (and it cannot be empty).If you use XSLT to generate your XSL-FO, you might want to use named attribute-sets (reusable collections of attributes; XSLT 2.0, XSLT 1.0).