]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Clarified error reported for order of static-content, flow within a
authorKelly Campbell <kellyc@apache.org>
Fri, 2 Feb 2001 04:52:03 +0000 (04:52 +0000)
committerKelly Campbell <kellyc@apache.org>
Fri, 2 Feb 2001 04:52:03 +0000 (04:52 +0000)
page-sequence to meet section 6.4.5 of the spec.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194013 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/Flow.java

index 429ba47beceab5d978234bf8f7cf754594ba272a..003d2297f19ed662811a7219cf196d9b1201bdfb 100644 (file)
@@ -112,11 +112,16 @@ public class Flow extends FObj {
        // multiplicity of fo:flow in XSL 1.0 is cleared up - one (1)
        // fo:flow per fo:page-sequence only.
        
-       if (!pageSequence.isFlowSet() || !(this.name.equals("fo:flow")))
-               pageSequence.addFlow(this);
-       else
+       if (pageSequence.isFlowSet()) {
+           if (this.name.equals("fo:flow")) {
                throw new FOPException("Only a single fo:flow permitted"
-               + " per fo:page-sequence");
+                                      + " per fo:page-sequence");
+           }
+           else {
+               throw new FOPException(this.name+" not allowed after fo:flow");
+           }
+       }
+       pageSequence.addFlow(this);
     }
 
     protected void setFlowName(String name)