DITA-OT:1.7.3
问题:我的自定义样式表中的空白章节出现错误:
"fo:block-container" is missing child elements. Required content model: marker* (%block;)+
默认 PDF2 样式呈现良好。
在章节中添加主题会使其消失。该错误仅给了我 topic.fo 的最后一行编号,其列为 0。
这是页面序列(缩进),错误所在的行在 id="d2e394" 之前开始:
<fo:page-sequence
xmlns:xs="http://www.w3.org/2001/XMLSchema"
force-page-count="no-force"
initial-page-number="1"
master-reference="body-sequence">
<fo:static-content
flow-name="xsl-footnote-separator">
<fo:block>
<fo:leader
color="black"
leader-length="25%"
leader-pattern="rule"
rule-style="solid"
rule-thickness="0.5pt"/>
</fo:block>
</fo:static-content>
<fo:static-content
flow-name="odd-body-footer">
<fo:table
font-size="8pt"
space-after="0.5in"
space-after.conditionality="retain"
text-align="end"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:table-column
column-width="40%"/>
<fo:table-column
column-width="20%"/>
<fo:table-column
column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block
margin-left=".93in"
text-align="left">PN: XXXXXX</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
text-align="center">
<fo:retrieve-marker
retrieve-class-name="current-chapter-number"/>-<fo:page-number/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
margin-right="0.74in"
text-align="right">
<fo:retrieve-marker
retrieve-class-name="current-document-header"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content
flow-name="even-body-footer">
<fo:table
font-size="8pt"
space-after="0.5in"
space-after.conditionality="retain"
text-align="end"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:table-column
column-width="40%"/>
<fo:table-column
column-width="20%"/>
<fo:table-column
column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block
margin-left=".93in"
text-align="left">PN: XXXXXX</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
text-align="center">
<fo:retrieve-marker
retrieve-class-name="current-chapter-number"/>-<fo:page-number/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
margin-right="0.74in"
text-align="right">
<fo:retrieve-marker
retrieve-class-name="current-document-header"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content
flow-name="odd-body-header">
<fo:table
font-size="8pt"
margin-top="0.50in"
space-before="10pt"
space-before.conditionality="retain"
text-align="end"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:table-column
column-width="50%"/>
<fo:table-column
column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell
display-align="after">
<fo:block
border-bottom="1pt solid black"
margin-left=".93in"
text-align="left">
<fo:retrieve-marker
retrieve-class-name="current-h2"/>
</fo:block>
</fo:table-cell>
<fo:table-cell
display-align="after">
<fo:block
border-bottom="1pt solid black"
margin-right="0.74in"
text-align="right">
<fo:retrieve-marker
retrieve-class-name="current-chapter-header"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content
flow-name="even-body-header">
<fo:table
font-size="8pt"
margin-top="0.50in"
space-before="10pt"
space-before.conditionality="retain"
text-align="end"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:table-column
column-width="50%"/>
<fo:table-column
column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell
display-align="after">
<fo:block
border-bottom="1pt solid black"
margin-left=".93in"
text-align="left">
<fo:retrieve-marker
retrieve-class-name="current-h2"/>
</fo:block>
</fo:table-cell>
<fo:table-cell
display-align="after">
<fo:block
border-bottom="1pt solid black"
margin-right="0.74in"
text-align="right">
<fo:retrieve-marker
retrieve-class-name="current-chapter-header"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content
flow-name="first-body-header">
<fo:block
end-indent="10pt"
space-before="10pt"
space-before.conditionality="retain"
text-align="end"/>
</fo:static-content>
<fo:static-content
flow-name="first-body-footer">
<fo:table
font-size="8pt"
space-after="0.5in"
space-after.conditionality="retain"
text-align="end"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:table-column
column-width="40%"/>
<fo:table-column
column-width="20%"/>
<fo:table-column
column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block
margin-left=".93in"
text-align="left">PN: XXXXXX</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
text-align="center">
<fo:retrieve-marker
retrieve-class-name="current-chapter-number"/>-<fo:page-number/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
margin-right="0.74in"
text-align="right">
<fo:retrieve-marker
retrieve-class-name="current-document-header"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content
flow-name="last-body-header">
<fo:block/>
</fo:static-content>
<fo:static-content
flow-name="last-body-footer">
<fo:table
font-size="8pt"
space-after="0.5in"
space-after.conditionality="retain"
text-align="end"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:table-column
column-width="40%"/>
<fo:table-column
column-width="20%"/>
<fo:table-column
column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block
margin-left=".93in"
text-align="left">PN: XXXXXX</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
text-align="center">
<fo:retrieve-marker
retrieve-class-name="current-chapter-number"/>-<fo:page-number/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
margin-right="0.74in"
text-align="right">
<fo:retrieve-marker
retrieve-class-name="current-document-header"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:flow
flow-name="xsl-region-body">
<fo:marker
marker-class-name="current-topic-number">6</fo:marker>
<fo:marker
marker-class-name="current-chapter-header">test</fo:marker>
<fo:marker
marker-class-name="current-document-header">
<fo:block
font-size="inherit"
start-indent="0in">
<fo:inline
border-left-width="0pt"
border-right-width="0pt">
<fo:inline
border-left-width="0pt"
border-right-width="0pt">bookmeta/shortdesc<fo:inline
baseline-shift="20%"
font-size="75%"
line-height-shift-adjustment="disregard-shifts"><fo:inline
line-height="100%"
font-family="Helvetica, Arial Unicode MS"
baseline-shift="20%"
font-size="smaller">®</fo:inline>
</fo:inline>
</fo:inline> test</fo:inline>
</fo:block>
</fo:marker>
<fo:block
font-size="10pt"
id="d2e394"
space-after="0.25in"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:marker
marker-class-name="current-chapter-number">6</fo:marker>
<fo:marker
marker-class-name="bookmap-partno"/>
<fo:table
table-layout="fixed">
<fo:table-column
column-width="0.75in"/>
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell
display-align="after">
<fo:block
border-bottom="3pt solid black"
border-bottom-style="solid"
border-bottom-width="2pt"
border-top-style="none"
border-top-width="2pt"
break-before="auto"
font-size="18pt"
font-weight="bold"
keep-with-next.within-column="always"
padding-top="10pt"
space-after="16.8pt"
space-before="0pt"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:inline
id="_OPENTOPIC_TOC_PROCESSING_d80e3474">
<fo:inline
border-bottom-style="none"
border-bottom-width="2pt"
border-top-style="none"
border-top-width="2pt"
font-size="20pt"
font-weight="bold"
padding-top="10pt">
<fo:marker
marker-class-name="chapter-for-fig">6</fo:marker>
<fo:inline
font-size="36pt"
font-weight="bold"
padding-right="0.485in">6</fo:inline>
</fo:inline>
</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell
display-align="after">
<fo:block
border-bottom="3pt solid black"
border-bottom-style="solid"
border-bottom-width="2pt"
border-top-style="none"
border-top-width="2pt"
break-before="auto"
font-size="18pt"
font-weight="bold"
keep-with-next.within-column="always"
padding-top="10pt"
space-after="16.8pt"
space-before="0pt"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">test</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block-container
margin-left="0.75in"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
这是使用默认 PDF2 样式的等价物:
<fo:page-sequence
force-page-count="even"
master-reference="body-sequence">
<fo:static-content
flow-name="xsl-footnote-separator">
<fo:block>
<fo:leader
color="black"
leader-length="25%"
leader-pattern="rule"
rule-style="solid"
rule-thickness="0.5pt"/>
</fo:block>
</fo:static-content>
<fo:static-content
flow-name="odd-body-footer">
<fo:block
end-indent="10pt"
space-after="10pt"
space-after.conditionality="retain"
text-align="end"/>
</fo:static-content>
<fo:static-content
flow-name="odd-body-header">
<fo:block
end-indent="10pt"
space-before="10pt"
space-before.conditionality="retain"
text-align="end"> | <fo:inline><fo:retrieve-marker
retrieve-class-name="current-header"/>
</fo:inline> | <fo:inline
font-weight="bold"><fo:page-number/>
</fo:inline>
</fo:block>
</fo:static-content>
<fo:static-content
flow-name="first-body-header">
<fo:block
end-indent="10pt"
space-before="10pt"
space-before.conditionality="retain"
text-align="end"/>
</fo:static-content>
<fo:static-content
flow-name="first-body-footer">
<fo:block
end-indent="10pt"
space-after="10pt"
space-after.conditionality="retain"
text-align="end"/>
</fo:static-content>
<fo:static-content
flow-name="last-body-header">
<fo:block/>
</fo:static-content>
<fo:static-content
flow-name="last-body-footer">
<fo:block/>
</fo:static-content>
<fo:flow
flow-name="xsl-region-body">
<fo:block
font-size="10pt"
id="d2e394">
<fo:marker
marker-class-name="current-topic-number">6</fo:marker>
<fo:marker
marker-class-name="current-header">test</fo:marker>
<fo:block
id="_OPENTOPIC_TOC_PROCESSING_d61e3474">
<fo:block
border-bottom-style="solid"
border-bottom-width="2pt"
border-top-style="solid"
border-top-width="2pt"
font-size="20pt"
font-weight="bold"
padding-top="10pt">Chapter <fo:block
font-size="40pt"
font-weight="bold">6</fo:block>
</fo:block>
</fo:block>
<fo:block
border-bottom="3pt solid black"
font-size="18pt"
font-weight="bold"
keep-with-next.within-column="always"
padding-top="16.8pt"
space-after="16.8pt"
space-before="0pt"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">test</fo:block>
<fo:table
page-break-after="always"
table-layout="fixed"
width="100%">
<fo:table-column
column-number="1"
column-width="35%"/>
<fo:table-column
column-number="2"
column-width="65%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block
end-indent="5pt"
font-size="10.5pt"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS"/>
</fo:table-cell>
<fo:table-cell
border-left-color="black"
border-left-style="solid"
border-left-width="1pt"
padding-left="10pt">
<fo:block/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
我的风格完全不同,我很难确定从哪里开始解决这个问题。任何指导表示赞赏。