수정할 수 있습니다 fo:static-content
때 fo:page-sequence
에 당신이 출력. fo:marker
및 fo:retrieve-marker
을 사용하면 특정 페이지에 포함 된 정보를 기반으로 정적 컨텐츠를 설정할 수 있습니다. 예를 들어, revdate
속성을 만날 때마다 fo:marker
을 출력 할 수 있습니다. fo:static-content
에서 해당 마커의 값을 검색합니다. fo:marker
의
예 : fo:retrieve-marker
의
<fo:marker marker-class-name="footerRevdate">
<xsl:value-of select="@revdate"/>
</fo:marker>
예 : 사용자가 직접 정적 컨텐츠를 설정할 수 있습니다
<fo:static-content flow-name="some_flow">
<fo:block>
<fo:retrieve-marker retrieve-class-name="footerRevdate" retrieve-boundary="page-sequence" retrieve-position="last-starting-within-page"/>
</fo:block>
</fo:static-content>
. 이 콘텐츠는 해당 페이지 시퀀스의 모든 페이지에 적용됩니다. 예를 들어, 속성 chapnbr
이 0
과 같으면 페이지 번호 앞에 접두사를 출력 할 수 있습니다 (내용은 각 페이지 시퀀스마다 달라질 수 있음).
다음
<xsl:template match="chapter">
<xsl:variable name="page-prefix">
<xsl:choose>
<xsl:when test="number(@chapnbr)=0">INTRO-</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<fo:page-sequence master-reference="Body" font-family="Arial" font-size="10pt" force-page-count="even">
<fo:static-content flow-name="Even_Page_regionafter">
<fo:block>
<xsl:value-of select="concat('Page ',$page-prefix)"/><fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:template>
당신은 여기 최소화 테스트를 게시 할 수 있을까요? – khachik