dita - Stylesheets not recognizing empty chapter -


dita-ot: 1.7.3

problem: error on empty chapter in custom stylesheets:

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

default pdf2 styles render fine.

adding topic chapter makes go away. error gives me last line number of topic.fo column of 0.

here page-sequence (indented), line error on starts right before 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> 

and here's equivalent using default pdf2 styles:

<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> 

my styles radically different, i'm having difficulties isolating start on troubleshooting issue. guidance appreciated.

i believe problem lies <fo:block-container /> @ end of code. requires <block> child (and doesn't serve purpose without anyway).

try commenting out element , see how transform runs.

if works (and still need <fo:block-container />) add empty <block> child it's valid without child topics.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -