From e10c36853492170602d5cbf560c892244c95c7cd Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Fri, 16 Apr 2004 05:12:34 +0000 Subject: [PATCH] Added getFlowName() Fixed erroneous exception messages git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197511 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/fo/flow/FoStaticContent.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/fop/fo/flow/FoStaticContent.java b/src/java/org/apache/fop/fo/flow/FoStaticContent.java index ef6ddae3c..f51fa5d65 100644 --- a/src/java/org/apache/fop/fo/flow/FoStaticContent.java +++ b/src/java/org/apache/fop/fo/flow/FoStaticContent.java @@ -91,8 +91,7 @@ public class FoStaticContent extends FOPageSeqNode { /** * Construct an fo:static-content node, and buffer the contents for later -* parsing - * subtree. + * parsing. *

Content model for fo:static-content: (%block;)+ * @param foTree the FO tree being built * @param parent the parent FONode of this node @@ -109,9 +108,11 @@ public class FoStaticContent extends FOPageSeqNode { ncName = (NCName)(getPropertyValue(PropNames.FLOW_NAME)); } catch (PropertyException e) { throw new FOPException( - "Cannot find marker-class-name in fo:marker", e); + "Cannot find flow-name in fo:static-content", e); } catch (ClassCastException e) { - throw new FOPException("Wrong PropertyValue type in fo:marker", e); + throw new FOPException + ("Wrong PropertyValue type for flow-name in fo:static-content", + e); } flowName = ncName.getNCName(); @@ -132,11 +133,23 @@ public class FoStaticContent extends FOPageSeqNode { } /** + * Gets the buffer of XmlEvents from this + * fo:static-content subtree + * * @return the static-content subtree buffer */ public XmlEventsArrayBuffer getEventBuffer() { return buffer; } + /** + * Gets the flow-name with which this fo:static-content + * is associated + * + * @return the flow-name + */ + public String getFlowName() { + return flowName; + } } -- 2.39.5