Я новичок в XSL-FO.Я хочу отображать свой статический контент на некоторых страницах, а не на других.
Мой XSL выглядит примерно так:
<xsl:template match="analyseData">
<fo:root language="EN">
<fo:layout-master-set>
<fo:simple-page-master master-name="simpleA5"
page-height="210mm" page-width="297mm" margin-top="0mm"
margin-bottom="5mm" margin-left="0mm" margin-right="0mm">
<fo:region-body margin-top="30mm" margin-bottom="10mm" margin-left="5mm" margin-right="5mm" />
<fo:region-before extent="0mm" />
<fo:region-after extent="10mm" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simpleA5">
<fo:static-content flow-name="xsl-region-after">
<fo:block margin-left="5mm" margin-right="5mm">
<fo:table border-top="1.5px solid" border-top-color="#B22222">
<fo:table-column column-width="95mm" />
<fo:table-column column-width="95mm" />
<fo:table-column column-width="95mm" />
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="left" padding-top="0.25cm">
<fo:block>
Entité
Exercice
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" padding-top="0.25cm">
<fo:block>
24 July 2017
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" padding-top="0.25cm">
<fo:block>
Page
<fo:page-number />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-before">
<fo:block-container width="297mm" height="25mm"
background-color="#DCDCDC">
<fo:block margin-left="5mm" margin-top="5mm"
margin-right="2mm">
<fo:table>
<fo:table-column column-width="35mm" />
<fo:table-column column-width="25mm" />
<fo:table-column column-width="40mm" />
<fo:table-column column-width="40mm" />
<fo:table-column column-width="50mm" />
<fo:table-column column-width="25mm" />
<fo:table-column column-width="70mm" />
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:leader leader-length="2.6cm" leader-pattern="rule"
rule-style="solid" rule-thickness="0.06cm" />
<fo:block>
<fo:inline font-size="10pt">
Mode opératoire
</fo:inline>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:leader leader-length="2cm" leader-pattern="rule"
rule-style="solid" rule-thickness="0.06cm" color="#B22222" />
<fo:block>
<fo:inline font-size="10pt" color="#B22222">
Synthèse
</fo:inline>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:leader leader-length="3cm" leader-pattern="rule"
rule-style="solid" rule-thickness="0.06cm" />
<fo:block>
<fo:inline font-size="10pt" font-weight="bold">
Tests
Techniques
</fo:inline>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:leader leader-length="3cm" leader-pattern="rule"
rule-style="solid" rule-thickness="0.06cm" />
<fo:block>
<fo:inline font-size="10pt">
Tests Comptables
</fo:inline>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:leader leader-length="3.5cm" leader-pattern="rule"
rule-style="solid" rule-thickness="0.06cm" />
<fo:block>
<fo:inline font-size="10pt">
Réconcilation
comptable
</fo:inline>
</fo:block>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:leader leader-length="2cm" leader-pattern="rule"
rule-style="solid" rule-thickness="0.06cm" />
<fo:block>
<fo:inline font-size="10pt">
Annexes
</fo:inline>
</fo:block>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" border-collapse="collapse"
reference-orientation="0">
<xsl:call-template name="firstPage" />
<xsl:call-template name="modeOper" />
<xsl:call-template name="synthese" />
<xsl:call-template name="ResultTech" />
<xsl:call-template name="detailsTestTech" />
<xsl:apply-templates select="ruleTechData" />
<xsl:call-template name="detailsTestComp" />
<xsl:call-template name="detailsTestCad" />
<xsl:apply-templates select="ruleCadData" />
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
Я хочу отображать статический контент только в некоторых шаблонах.Например, в:
ResultTech ruleTechData ruleCadData
Может кто-нибудь подсказать мне выражение в XSL-FO, как решить эту проблему?Или если кто-то знает другой способ сделать это.