diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-07-25 15:54:20 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-07-25 15:54:20 +0000 |
commit | d57530eed04016c68143a1c01ea5320610e4a169 (patch) | |
tree | c878aa89092f5a753fd90db22a87f8810254e302 /src/java/org/apache/fop/render/xml/XMLXMLHandler.java | |
parent | 71e92910e627db28ed5bcff19d4593a7bd284575 (diff) | |
download | xmlgraphics-fop-d57530eed04016c68143a1c01ea5320610e4a169.tar.gz xmlgraphics-fop-d57530eed04016c68143a1c01ea5320610e4a169.zip |
Made Service a stand-alone class so it can be reused.
Made XMLHandler discoverable through the Service class.
Moved XMLHandler collection into new XMLHandlerRegistry class.
Adjusted the Renderers and XMLHandler to the above changes.
This should make it easier to write certain FOP extensions. The changes were triggered by my work on the FOP extension for Barcode4J for the FOP Trunk.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225143 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/xml/XMLXMLHandler.java')
-rw-r--r-- | src/java/org/apache/fop/render/xml/XMLXMLHandler.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/render/xml/XMLXMLHandler.java b/src/java/org/apache/fop/render/xml/XMLXMLHandler.java index 74c54629d..269f1dd45 100644 --- a/src/java/org/apache/fop/render/xml/XMLXMLHandler.java +++ b/src/java/org/apache/fop/render/xml/XMLXMLHandler.java @@ -40,14 +40,11 @@ public class XMLXMLHandler implements XMLHandler { private AttributesImpl atts = new AttributesImpl(); - /** - * @see org.apache.fop.render.XMLHandler#handleXML(RendererContext, Document, String) - */ - public void handleXML(RendererContext context, Document doc, - String ns) throws Exception { + /** @see org.apache.fop.render.XMLHandler */ + public void handleXML(RendererContext context, + org.w3c.dom.Document doc, String ns) throws Exception { TransformerHandler handler = (TransformerHandler) context.getProperty(HANDLER); - //String svg = "http://www.w3.org/2000/svg"; writeDocument(doc, handler); } @@ -166,5 +163,15 @@ public class XMLXMLHandler implements XMLHandler { return result.toString(); } + /** @see org.apache.fop.render.XMLHandler#getMimeType() */ + public String getMimeType() { + return XMLRenderer.XML_MIME_TYPE; + } + + /** @see org.apache.fop.render.XMLHandler#getNamespace() */ + public String getNamespace() { + return null; //Handle all XML content + } + } |