aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/UnknownXMLObj.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/fo/UnknownXMLObj.java')
-rw-r--r--src/org/apache/fop/fo/UnknownXMLObj.java50
1 files changed, 11 insertions, 39 deletions
diff --git a/src/org/apache/fop/fo/UnknownXMLObj.java b/src/org/apache/fop/fo/UnknownXMLObj.java
index 0110dd992..97a3f6e87 100644
--- a/src/org/apache/fop/fo/UnknownXMLObj.java
+++ b/src/org/apache/fop/fo/UnknownXMLObj.java
@@ -18,55 +18,27 @@ import org.w3c.dom.Element;
public class UnknownXMLObj extends XMLObj {
String namespace;
- /**
- * inner class for making unknown xml objects.
- */
- public static class Maker extends FObj.Maker {
+ public static class Maker extends ElementMapping.Maker {
String space;
- String tag;
- Maker(String sp, String t) {
+ Maker(String sp) {
space = sp;
- tag = t;
}
- /**
- * make an unknown xml object.
- *
- * @param parent the parent formatting object
- * @param propertyList the explicit properties of this object
- *
- * @return the unknown xml object
- */
- public FObj make(FObj parent,
- PropertyList propertyList) throws FOPException {
- return new UnknownXMLObj(parent, propertyList, space, tag);
+ public FObj make(FObj parent) {
+ return new UnknownXMLObj(parent, space);
}
}
/**
- * returns the maker for this object.
- *
- * @return the maker for an unknown xml object
- */
- public static FObj.Maker maker(String space, String tag) {
- return new UnknownXMLObj.Maker(space, tag);
- }
-
- /**
* constructs an unknown xml object (called by Maker).
*
* @param parent the parent formatting object
* @param propertyList the explicit properties of this object
*/
- protected UnknownXMLObj(FObj parent, PropertyList propertyList, String space, String tag) {
- super(parent, propertyList, tag);
+ protected UnknownXMLObj(FObj parent, String space) {
+ super(parent);
this.namespace = space;
- if(!"".equals(space)) {
- this.name = this.namespace + ":" + tag;
- } else {
- this.name = "(none):" + tag;
- }
}
public String getNameSpace() {
@@ -88,11 +60,11 @@ public class UnknownXMLObj extends XMLObj {
}
public Status layout(Area area) throws FOPException {
- //if (!(area instanceof ForeignObjectArea)) {
- // this is an error
- //throw new FOPException("Foreign XML not in fo:instream-foreign-object");
- //}
- log.error("no handler defined for " + this.name + " foreign xml");
+ if(!"".equals(this.namespace)) {
+ log.error("no handler defined for " + this.namespace + ":" + this.name + " foreign xml");
+ } else {
+ log.error("no handler defined for (none):" + this.name + " foreign xml");
+ }
/* return status */
return new Status(Status.OK);