我在XSLT下面使用运行页脚生成报告,但是报告的第一页没有运行页脚,请建议需要更改的内容
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="urn:my-scripts">
<xsl:template match="/" >
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set >
<fo:simple-page-master master-name="first"
page-height="290mm" page-width="210mm" margin-top="0mm" margin-bottom="10mm" margin-left="20mm" margin-right="0mm">
<fo:region-body margin-top="15mm" margin-bottom="15mm"/>
<fo:region-after extent="10mm" region-name="footer-normal"></fo:region-after>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:static-content flow-name="footer-normal">
<fo:block text-align="center" font-size="7pt" font-style="italic" font-family="sans-serif">
<fo:retrieve-marker retrieve-class-name="chapter"/>
PAGE <fo:page-number/> of
<fo:page-number-citation ref-id="last-page"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<xsl:for-each select="ArrayOfRoomReportBE/RoomReportBE" >
<xsl:variable name="RoomNo_node" select=".//RoomNumber"/>
<fo:marker marker-class-name="chapter" font-size="7pt" font-style="italic"
font-family="sans-serif">
<xsl:value-of select="$RoomNo_node"/>
</fo:marker>
<!-- Dispaly datat -->
</xsl:for-each>
<fo:block id="last-page"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
使用的输入文件如下
<ArrayOfRoomReportBE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RoomReportBE>
<Id>0</Id>
<RoomNumber>TestCap1</RoomNumber>
<RoomName>TestCap1</RoomName>
<Comment>Testing a bit</Comment>
<GeneralAspect>
<GeneralAttributeTitle>
<ReferenceLink>Reference Link</ReferenceLink>
<Notes>General Notes</Notes>
<GeneralHeader>General</GeneralHeader>
<MaxCO2>Max CO2</MaxCO2>
<DimensionHeader>Dimension</DimensionHeader>
<NetAreaTitle>Net area</NetAreaTitle>
<ClimateHeader>Climate</ClimateHeader>
<MinTempTitle>Min Temperature</MinTempTitle>
<MaxTempTitle>Max Temperature </MaxTempTitle>
<OpenHoursTitle>Open hours</OpenHoursTitle>
<NonOpenHoursTitle>Non open hours</NonOpenHoursTitle>
<AcousticsHeader>Acoustics</AcousticsHeader>
<MaxInstallationNoiseTitle>Max installation noise</MaxInstallationNoiseTitle>
<SoundInsulationTitle>Sound insulation</SoundInsulationTitle>
<WorkplacesOccupancyHeader>Occupancy/Workplaces</WorkplacesOccupancyHeader>
<OccupancyTitle>Occupancy</OccupancyTitle>
<NoOfWorkspaceTitle>Number of workplaces</NoOfWorkspaceTitle>
<TypeOfWorkspaceTitle>Type of workplaces</TypeOfWorkspaceTitle>
</GeneralAttributeTitle>
<AspectAttributeItems>
<GeneralAttributeItemBE>
<GeneralNoOfWorkplaces />
<GeneralDimensionNetArea>12</GeneralDimensionNetArea>
<GeneralClimateMinTempOpen>-19°C</GeneralClimateMinTempOpen>
<GeneralClimateMinTempNonOpen>-15°C</GeneralClimateMinTempNonOpen>
<GeneralClimateMaxTempOpen>-6°C</GeneralClimateMaxTempOpen>
<GeneralClimateMaxTempNonOpen>-11°C</GeneralClimateMaxTempNonOpen>
<Notes />
<ReferenceLink />
</GeneralAttributeItemBE>
</AspectAttributeItems>
</GeneralAspect>
<FloorAspect>
<FloorAttributeTitle>
<Description>Description</Description>
<ReferenceLink>Reference Link</ReferenceLink>
<Notes>General Notes</Notes>
<FloorFinishTitle>Floor Finish</FloorFinishTitle>
<FloorHeader>Floor</FloorHeader>
<FloorSubstractTitle>Floor Substrate</FloorSubstractTitle>
<FloorColorTitle>Floor Colour</FloorColorTitle>
<FloorSkirtingTitle>Skirting</FloorSkirtingTitle>
</FloorAttributeTitle>
<AspectAttributeItems>
<FloorAttributeItemBE>
<Description />
<Notes />
<ReferenceLink />
</FloorAttributeItemBE>
<FloorAttributeItemBE>
<FloorSubstract>Block pavement</FloorSubstract>
<FloorColor>Medium grey</FloorColor>
<FloorSkirting>N/A</FloorSkirting>
<FloorFinish>Ceramic tiles textured</FloorFinish>
<Description>test</Description>
<Notes />
<ReferenceLink />
</FloorAttributeItemBE>
</AspectAttributeItems>
</FloorAspect>
<WallAspect>
<WallAttributeTitle>
<Description>Description</Description>
<ReferenceLink>Reference Link</ReferenceLink>
<Notes>General Notes</Notes>
<WallHeader>Wall</WallHeader>
<WallNameTitle>Wall</WallNameTitle>
<WallFinishTitle>Wall finish</WallFinishTitle>
<WallColorTitle>Wall Colour</WallColorTitle>
</WallAttributeTitle>
<AspectAttributeItems>
<WallAttributeItemBE>
<WallName>Facade</WallName>
<WallFinish>Special</WallFinish>
<WallColor>TestValue</WallColor>
<Description>test</Description>
<Notes />
<ReferenceLink>test</ReferenceLink>
</WallAttributeItemBE>
</AspectAttributeItems>
</WallAspect>
<CeilingAspect>
<CeilingAttributeTitle>
<ReferenceLink>Reference Link</ReferenceLink>
<Notes>General Notes</Notes>
<AcousticsTitle>Acoustics</AcousticsTitle>
<CeilingInsertsTitle>Inserts</CeilingInsertsTitle>
<CeilingHeightTitle>Ceiling height</CeilingHeightTitle>
<CeilingHeader>Ceiling</CeilingHeader>
<CeilingSuspendedTitle>Suspended Ceiling</CeilingSuspendedTitle>
<CeilingRoomAcousticsTitle>Room acoustics</CeilingRoomAcousticsTitle>
<CeilingCoverageTitle>Coverage</CeilingCoverageTitle>
<CeilingTypeTitle>Type</CeilingTypeTitle>
<CeilingOthersTitle>Other</CeilingOthersTitle>
</CeilingAttributeTitle>
<AspectAttributeItems>
<CeilingAttributeItemBE>
<Notes />
<ReferenceLink />
</CeilingAttributeItemBE>
</AspectAttributeItems>
</CeilingAspect>
<EquipmentAspect>
<EquipmentAttributeTitle>
<ReferenceLink>Reference Link</ReferenceLink>
<Notes>General Notes</Notes>
<EquipmentHeader>Equipment</EquipmentHeader>
<EquipmentNameTitle>Equipment</EquipmentNameTitle>
<EquipmentQuantityTitle>Quantity</EquipmentQuantityTitle>
<EquipmentConnectionsTitle>Connections</EquipmentConnectionsTitle>
<Description>Description</Description>
</EquipmentAttributeTitle>
<AspectAttributeItems>
<EquipmentAttributeItemBE>
<EquipmentName>-</EquipmentName>
<EquipmentQuantity>100</EquipmentQuantity>
<EquipmentConnections>220V</EquipmentConnections>
<Description>test2</Description>
<Notes />
<ReferenceLink />
</EquipmentAttributeItemBE>
</AspectAttributeItems>
</EquipmentAspect>
</RoomReportBE>
<RoomReportBE>
</RoomReportBE>
</ArrayOfRoomReportBE>
答案 0 :(得分:0)
请更改两件事:首先,<fo:region-after extent="10mm" region-name="footer-normal">
改为<fo:region-after extent="10mm">
。第二,将<fo:static-content flow-name="footer-normal">
更改为<fo:static-content flow-name="xsl-region-after">.