From: Kelly Campbell Date: Fri, 2 Feb 2001 04:52:03 +0000 (+0000) Subject: Clarified error reported for order of static-content, flow within a X-Git-Tag: fop-0_17_0~48 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=114349230d96b85ca2e0236e10d4b2882c98d975;p=xmlgraphics-fop.git Clarified error reported for order of static-content, flow within a 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 --- diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java index 429ba47be..003d2297f 100644 --- a/src/org/apache/fop/fo/flow/Flow.java +++ b/src/org/apache/fop/fo/flow/Flow.java @@ -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)