https://issues.apache.org/bugzilla/show_bug.cgi?id=54094

          Priority: P2
            Bug ID: 54094
          Assignee: fop-dev@xmlgraphics.apache.org
           Summary: break-before="page" causes IllegalArgumentException
          Severity: normal
    Classification: Unclassified
          Reporter: ja...@plutext.org
          Hardware: PC
            Status: NEW
           Version: 1.1
         Component: fo tree
           Product: Fop

@break-before="page" in the below fo causes:

    java.lang.IllegalArgumentException: Only non-null Positions with an index
can be checked

in both FOP 1.0 and 1.1.

(see below for stack trace).  Remove it and things work fine.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <layout-master-set xmlns="http://www.w3.org/1999/XSL/Format";>
    <simple-page-master margin-bottom="0.25in" margin-left="1.25in"
margin-right="1.25in" margin-top="0.25in" master-name="s1-default"
page-height="296mm" page-width="210mm">
      <region-body margin-bottom="19mm" margin-left="0mm" margin-right="0mm"
margin-top="19mm"/>
      <region-before extent="12mm" region-name="xsl-region-before-default"/>
      <region-after extent="12mm" region-name="xsl-region-after-default"/>
    </simple-page-master>
    <simple-page-master margin-bottom="0.25in" margin-left="1.25in"
margin-right="1.25in" margin-top="0.25in" master-name="s1-simple"
page-height="296mm" page-width="210mm">
      <region-body margin-bottom="19mm" margin-left="0mm" margin-right="0mm"
margin-top="19mm"/>
      <region-before extent="12mm" region-name="xsl-region-before-simple"/>
      <region-after extent="12mm" region-name="xsl-region-after-simple"/>
    </simple-page-master>
    <page-sequence-master master-name="s1">
      <repeatable-page-master-alternatives>
        <conditional-page-master-reference master-reference="s1-default"/>
        <conditional-page-master-reference master-reference="s1-simple"/>
      </repeatable-page-master-alternatives>
    </page-sequence-master>
  </layout-master-set>
  <fo:page-sequence initial-page-number="1" format="1" master-reference="s1">
    <fo:static-content flow-name="xsl-region-before-default">

      <fo:block font-family="Cambria" font-size="12.0pt"
white-space-treatment="preserve"> </fo:block>
    </fo:static-content>
    <fo:static-content flow-name="xsl-region-after-default">

      <fo:block font-family="Cambria" font-size="12.0pt">
        <inline xmlns="http://www.w3.org/1999/XSL/Format"; font-family="Cambria"
font-size="12.0pt"/>
        <page-number xmlns="http://www.w3.org/1999/XSL/Format"/>
      </fo:block>

      <fo:block font-family="Cambria" font-size="12.0pt" text-indent="0.25in"
white-space-treatment="preserve"> </fo:block>
    </fo:static-content>
    <fo:static-content flow-name="xsl-footnote-separator">
      <fo:block>
        <fo:leader rule-thickness="0.5pt" rule-style="solid"
leader-length="100%" leader-pattern="rule"/>
      </fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">

      <fo:list-block provisional-distance-between-starts="0.5in"
start-indent="0.5in">
        <fo:list-item>
          <fo:list-item-label>
            <fo:block>1.</fo:block>
          </fo:list-item-label>
          <fo:list-item-body start-indent="body-start()">
            <fo:block break-before="page" color="#345A8A" font-family="Calibri"
font-size="16.0pt" font-weight="bold" keep-with-next="always"
line-height="115%" space-after="4mm" space-before="0in">
              <inline xmlns="http://www.w3.org/1999/XSL/Format"; color="#345A8A"
font-family="Calibri" font-size="16.0pt" font-weight="bold">I</inline>
              <inline xmlns="http://www.w3.org/1999/XSL/Format"; color="#345A8A"
font-family="Calibri" font-size="16.0pt"
font-weight="bold">ntroducción</inline>
            </fo:block>
          </fo:list-item-body>
        </fo:list-item>
      </fo:list-block>



    </fo:flow>
  </fo:page-sequence>
</fo:root>

Caused by: java.lang.IllegalArgumentException: Only non-null Positions with an
index can be checked
    at
org.apache.fop.layoutmgr.AbstractLayoutManager.verifyNonNullPosition(AbstractLayoutManager.java:309)
    at
org.apache.fop.layoutmgr.AbstractLayoutManager.isFirst(AbstractLayoutManager.java:321)
    at
org.apache.fop.layoutmgr.list.ListItemContentLayoutManager.addAreas(ListItemContentLayoutManager.java:136)
    at
org.apache.fop.layoutmgr.list.ListItemLayoutManager.addAreas(ListItemLayoutManager.java:542)
    at
org.apache.fop.layoutmgr.list.ListBlockLayoutManager.addAreas(ListBlockLayoutManager.java:184)
    at
org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.java:113)
    at
org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager.java:364)
    at org.apache.fop.layoutmgr.PageBreaker.addAreas(PageBreaker.java:285)
    at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:607)
    at
org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:481)
    at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:313)
    at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:436)
    at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:90)
    at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:113)
    at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
    at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128)
    at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
    at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to