1

DITA-OT: 1.7.3

問題: カスタム スタイルシートの空の章でエラーが発生します。

"fo:block-container" is missing child elements. Required content model: marker* (%block;)+

デフォルトの PDF2 スタイルは正常にレンダリングされます。

章にトピックを追加すると、トピックがなくなります。このエラーは、列が 0 の topic.fo の最後の行番号のみを表示します。

これがページ シーケンスです (インデントされています)。エラーが発生している行は 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>

私のスタイルは根本的に異なるため、この問題のトラブルシューティングをどこから始めるべきかを特定するのに苦労しています。任意のガイダンスをいただければ幸いです。

4

1 に答える 1

5

問題は<fo:block-container />コードの最後にあると思います。それには<block>子が必要です (とにかくそれなしではあまり役に立ちません)。

その要素をコメントアウトして、変換がどのように実行されるかを確認してください。

それが機能する場合(そしてまだ必要な場合<fo:block-container />)、空<block>の子として追加して、子トピックがなくても有効になるようにします。

于 2013-04-05T15:26:56.150 に答える