From 114349230d96b85ca2e0236e10d4b2882c98d975 Mon Sep 17 00:00:00 2001 From: Kelly Campbell Date: Fri, 2 Feb 2001 04:52:03 +0000 Subject: [PATCH] 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 --- src/org/apache/fop/fo/flow/Flow.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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) -- 2.39.5