1 51 package org.apache.fop.fo; 52 53 import org.apache.fop.layout.Area; 55 import org.apache.fop.layout.inline.*; 56 import org.apache.fop.apps.FOPException; 57 58 61 public class XMLElement extends XMLObj { 62 String namespace = ""; 63 64 67 public static class Maker extends FObj.Maker { 68 String tag; 69 70 Maker(String t) { 71 tag = t; 72 } 73 74 82 public FObj make(FObj parent, PropertyList propertyList, 83 String systemId, int line, int column) 84 throws FOPException { 85 return new XMLElement(parent, propertyList, tag, 86 systemId, line, column); 87 } 88 } 89 90 95 public static FObj.Maker maker(String tag) { 96 return new XMLElement.Maker(tag); 97 } 98 99 105 public XMLElement(FObj parent, PropertyList propertyList, String tag, 106 String systemId, int line, int column) { 107 super(parent, propertyList, tag, systemId, line, column); 108 init(); 109 } 110 111 public String getName() { 112 return tagName; 113 } 114 115 122 public int layout(final Area area) throws FOPException { 123 124 if (!(area instanceof ForeignObjectArea)) { 125 throw new FOPException("XML not in fo:instream-foreign-object", 127 systemId, line, column); 128 } 129 130 131 return Status.OK; 132 } 133 134 private void init() { 135 createBasicDocument(); 136 } 137 138 public String getNameSpace() { 139 return namespace; 140 } 141 } 142 | Popular Tags |