我进行了修改layout-masters.xsl并添加了layout-masters.xslin catalog.xml。但是,更改不会出现在输出 PDF 文件中。我怎样才能让它识别修改?
如果我直接在修改layout-masteres中org.dita.pdf2修改出现输出PDF文件。因此,似乎工作正常,但不知何故 fo在我的插件layout-masters-attr.xsl中没有提到。layout-masteres.xsl
layout-masteres.xsl文件:
<!-- First page-->
<fo:simple-page-master master-name="front-matter-first" xsl:use-attribute-sets="simple-page-master">
<fo:region-body xsl:use-attribute-sets="region-body.first"/>
<fo:region-before region-name="first-body-header" xsl:use-attribute-sets="region-before.first"/>
<fo:region-after region-name="first-body-footer" xsl:use-attribute-sets="region-after"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="front-matter-last" xsl:use-attribute-sets="simple-page-master">
<fo:region-body xsl:use-attribute-sets="region-body.first"/>
<fo:region-before region-name="last-frontmatter-header" xsl:use-attribute-sets="region-before.first"/>
<fo:region-after region-name="last-frontmatter-footer" xsl:use-attribute-sets="region-after"/>
</fo:simple-page-master>
layout-masteres-attrs.xsl文件:
<!--first page without header (pale blue) -->
<xsl:attribute-set name="region-body.first">
<xsl:attribute name="margin-top">
<xsl:value-of select="$page-margin-top-first"/>
</xsl:attribute>
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$page-margin-bottom"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}">
<xsl:value-of select="$page-margin-inside"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}">
<xsl:value-of select="$page-margin-outside"/>
</xsl:attribute>
<xsl:attribute name="background-color">#84f9ff</xsl:attribute>
</xsl:attribute-set>
catalog.xml文件:
<?xml version='1.0' encoding='utf-8'?>
<catalog prefer="system" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="cfg:fo/attrs/custom.xsl" uri="fo/attrs/custom.xsl" />
<uri name="cfg:fo/xsl/custom.xsl" uri="fo/xsl/custom.xsl" />
<uri name="cfg:fo/font-mappings.xsl" uri="fo/font-mappings.xsl" />
<uri name="cfg:fo/layout-masters.xsl" uri="fo/layout-masters.xsl" />
</catalog>