diff options
author | Keiron Liddle <keiron@apache.org> | 2001-11-06 08:34:53 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2001-11-06 08:34:53 +0000 |
commit | 31965968c68717055bbd096b709df3e72ceb8b40 (patch) | |
tree | 92820b3533809c21ea4decd0069edbb1e858f064 /src/org/apache/fop/fo/flow/Flow.java | |
parent | cfc0da75fcc187e6dd7596e7480c4941e278b9d5 (diff) | |
download | xmlgraphics-fop-31965968c68717055bbd096b709df3e72ceb8b40.tar.gz xmlgraphics-fop-31965968c68717055bbd096b709df3e72ceb8b40.zip |
changed the way that elements and properties are handled
the element makers are associated with the element mapping
attributes are passed to the element object the object can then
use the attributes to make the properties
added default value for element handling, makes it easier to
ensure all elements of an external xml markup are loaded (eg. svg)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/flow/Flow.java')
-rw-r--r-- | src/org/apache/fop/fo/flow/Flow.java | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java index 9846c86d7..d705d9cd2 100644 --- a/src/org/apache/fop/fo/flow/Flow.java +++ b/src/org/apache/fop/fo/flow/Flow.java @@ -20,19 +20,9 @@ import java.util.Hashtable; import java.util.Enumeration; import java.util.Vector; -public class Flow extends FObj { - - public static class Maker extends FObj.Maker { - public FObj make(FObj parent, - PropertyList propertyList) throws FOPException { - return new Flow(parent, propertyList); - } +import org.xml.sax.Attributes; - } - - public static FObj.Maker maker() { - return new Flow.Maker(); - } +public class Flow extends FObj { /** * PageSequence container @@ -62,11 +52,13 @@ public class Flow extends FObj { private Status _status = new Status(Status.AREA_FULL_NONE); - protected Flow(FObj parent, - PropertyList propertyList) throws FOPException { - super(parent, propertyList); + public Flow(FObj parent) { + super(parent); this.name = getElementName(); + } + public void handleAttrs(Attributes attlist) throws FOPException { + super.handleAttrs(attlist); if (parent.getName().equals("fo:page-sequence")) { this.pageSequence = (PageSequence)parent; } else { @@ -74,14 +66,11 @@ public class Flow extends FObj { + "page-sequence, not " + parent.getName()); } - setFlowName(getProperty("flow-name").getString()); - // according to communication from Paul Grosso (XSL-List, // 001228, Number 406), confusion in spec section 6.4.5 about // multiplicity of fo:flow in XSL 1.0 is cleared up - one (1) // fo:flow per fo:page-sequence only. - - if (pageSequence.isFlowSet()) { +/* if (pageSequence.isFlowSet()) { if (this.name.equals("fo:flow")) { throw new FOPException("Only a single fo:flow permitted" + " per fo:page-sequence"); @@ -90,6 +79,8 @@ public class Flow extends FObj { + " not allowed after fo:flow"); } } +*/ + setFlowName(getProperty("flow-name").getString()); pageSequence.addFlow(this); } |