aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/accessibility/Accessibility.java (renamed from src/java/org/apache/fop/accessibility/AccessibilityUtil.java)71
-rw-r--r--src/java/org/apache/fop/accessibility/AccessibilityPreprocessor.java (renamed from src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java)46
-rw-r--r--src/java/org/apache/fop/accessibility/TransformerNode.java216
-rw-r--r--src/java/org/apache/fop/apps/FOUserAgent.java6
-rw-r--r--src/java/org/apache/fop/apps/Fop.java4
-rw-r--r--src/java/org/apache/fop/cli/CommandLineOptions.java4
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java4
-rw-r--r--src/java/org/apache/fop/util/TransformerDefaultHandler.java160
8 files changed, 217 insertions, 294 deletions
diff --git a/src/java/org/apache/fop/accessibility/AccessibilityUtil.java b/src/java/org/apache/fop/accessibility/Accessibility.java
index 4063d3f9f..d550b433a 100644
--- a/src/java/org/apache/fop/accessibility/AccessibilityUtil.java
+++ b/src/java/org/apache/fop/accessibility/Accessibility.java
@@ -21,8 +21,10 @@ package org.apache.fop.accessibility;
import javax.xml.transform.Source;
import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamSource;
import org.xml.sax.helpers.DefaultHandler;
@@ -31,22 +33,25 @@ import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
/**
- * Utility class for FOP's accessibility features. It provides the stylesheets used for processing
- * the incoming XSL-FO stream and for setting up the transformation.
+ * Helper class for FOP's accessibility features.
*/
-public class AccessibilityUtil {
+public final class Accessibility {
/** Constant string for the rendering options key to enable accessibility features. */
public static final String ACCESSIBILITY = "accessibility";
+ // TODO what if the default factory is not a SAXTransformerFactory?
private static SAXTransformerFactory tfactory
- = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+ = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
private static Templates addPtrTemplates;
- private static Templates reduceFOTemplates;
+
+ private static Templates reduceFOTreeTemplates;
+
+ private Accessibility() { }
/**
- * Decorates the given {@link DefaultHandler} so the structure tree used for accessibility
+ * Decorates the given handler so the structure tree used for accessibility
* features can be branched off the main content stream.
* @param handler the handler to decorate
* @param userAgent the user agent
@@ -55,46 +60,28 @@ public class AccessibilityUtil {
*/
public static DefaultHandler decorateDefaultHandler(DefaultHandler handler,
FOUserAgent userAgent) throws FOPException {
- DefaultHandler transformNode = new TransformerNodeEndProcessing(
- getAddPtrTemplates(), handler, userAgent);
- return transformNode;
+ try {
+ setupTemplates();
+ TransformerHandler addPtr = tfactory.newTransformerHandler(addPtrTemplates);
+ Transformer reduceFOTree = reduceFOTreeTemplates.newTransformer();
+ return new AccessibilityPreprocessor(addPtr, reduceFOTree, userAgent, handler);
+ } catch (TransformerConfigurationException e) {
+ throw new FOPException(e);
+ }
}
- /**
- * Returns the addPtr.xsl stylesheet.
- * @return the addPtr.xsl stylesheet
- * @throws FOPException if transform fails
- */
- public static synchronized Templates getAddPtrTemplates() throws FOPException {
+ private static synchronized void setupTemplates() throws TransformerConfigurationException {
if (addPtrTemplates == null) {
- //Load and cache stylesheet
- Source src = new StreamSource(
- AccessibilityUtil.class.getResource("addPtr.xsl").toExternalForm());
- try {
- addPtrTemplates = tfactory.newTemplates(src);
- } catch (TransformerConfigurationException e) {
- throw new FOPException(e);
- }
+ addPtrTemplates = loadTemplates("addPtr.xsl");
+ }
+ if (reduceFOTreeTemplates == null) {
+ reduceFOTreeTemplates = loadTemplates("reduceFOTree.xsl");
}
- return addPtrTemplates;
}
- /**
- * Returns the reduceFOTree.xsl stylesheet
- * @return the reduceFOTree.xsl stylesheet
- * @throws FOPException if an error occurs loading the stylesheet
- */
- public static synchronized Templates getReduceFOTreeTemplates() throws FOPException {
- if (reduceFOTemplates == null) {
- //Load and cache stylesheet
- Source src = new StreamSource(
- AccessibilityUtil.class.getResource("reduceFOTree.xsl").toExternalForm());
- try {
- reduceFOTemplates = tfactory.newTemplates(src);
- } catch (TransformerConfigurationException e) {
- throw new FOPException(e);
- }
- }
- return reduceFOTemplates;
+ private static Templates loadTemplates(String source) throws TransformerConfigurationException {
+ Source src = new StreamSource(Accessibility.class.getResource(source).toExternalForm());
+ return tfactory.newTemplates(src);
}
- } \ No newline at end of file
+
+}
diff --git a/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java b/src/java/org/apache/fop/accessibility/AccessibilityPreprocessor.java
index 36f36fdef..1958b74a8 100644
--- a/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java
+++ b/src/java/org/apache/fop/accessibility/AccessibilityPreprocessor.java
@@ -24,11 +24,10 @@ import java.io.InputStream;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.Result;
import javax.xml.transform.Source;
-import javax.xml.transform.Templates;
import javax.xml.transform.Transformer;
import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
@@ -38,35 +37,31 @@ import org.xml.sax.helpers.DefaultHandler;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.util.TransformerDefaultHandler;
/**
- * An extension of TransformerNode used to run 2nd transform after completion of first
+ * This class prepares an XSL-FO document for accessibility. It adds a unique
+ * identifier to every applicable FO, then creates the structure tree, before
+ * handing the document over to the regular handler.
*/
-class TransformerNodeEndProcessing extends TransformerNode {
+class AccessibilityPreprocessor extends TransformerDefaultHandler {
private final ByteArrayOutputStream enrichedFOBuffer = new ByteArrayOutputStream();
- private DefaultHandler delegateHandler = null;
+
+ private final Transformer reduceFOTree;
+
private final FOUserAgent userAgent;
- /**
- * Do a transform, but perform special processing at the end for the access
- * stuff.
- *
- * @param xsltTemplates Transform to do.
- * @param fopHandler Used in the end processing
- * @param userAgent the userAgent
- * @throws FOPException
- * if transform fails
- */
- public TransformerNodeEndProcessing(Templates xsltTemplates, DefaultHandler fopHandler,
- FOUserAgent userAgent) throws FOPException {
- super(xsltTemplates);
- delegateHandler = fopHandler;
+ private final DefaultHandler fopHandler;
+
+ public AccessibilityPreprocessor(TransformerHandler addPtr, Transformer reduceFOTree,
+ FOUserAgent userAgent, DefaultHandler fopHandler) {
+ super(addPtr);
+ this.reduceFOTree = reduceFOTree;
this.userAgent = userAgent;
- Result res1 = new StreamResult(enrichedFOBuffer);
- super.initResult(res1);
+ this.fopHandler = fopHandler;
+ getTransformerHandler().setResult(new StreamResult(enrichedFOBuffer));
}
/** {@inheritDoc} */
@@ -76,10 +71,9 @@ class TransformerNodeEndProcessing extends TransformerNode {
try {
//TODO this must be optimized, no buffering (ex. SAX-based tee-proxy)
byte[] enrichedFO = enrichedFOBuffer.toByteArray();
- Transformer transformer = AccessibilityUtil.getReduceFOTreeTemplates().newTransformer();
Source src = new StreamSource(new ByteArrayInputStream(enrichedFO));
DOMResult res = new DOMResult();
- transformer.transform(src, res);
+ reduceFOTree.transform(src, res);
StructureTree structureTree = new StructureTree();
NodeList pageSequences = res.getNode().getFirstChild().getChildNodes();
for (int i = 0; i < pageSequences.getLength(); i++) {
@@ -92,12 +86,10 @@ class TransformerNodeEndProcessing extends TransformerNode {
saxParserFactory.setValidating(false);
SAXParser saxParser = saxParserFactory.newSAXParser();
InputStream in = new ByteArrayInputStream(enrichedFO);
- saxParser.parse(in, delegateHandler);
+ saxParser.parse(in, fopHandler);
} catch (Exception e) {
- // TODO Auto-generated catch block
throw new SAXException(e);
}
-
}
}
diff --git a/src/java/org/apache/fop/accessibility/TransformerNode.java b/src/java/org/apache/fop/accessibility/TransformerNode.java
deleted file mode 100644
index b127a74b5..000000000
--- a/src/java/org/apache/fop/accessibility/TransformerNode.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.accessibility;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Templates;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.apache.fop.apps.FOPException;
-
-/**
- * Used for accessibility to run required xslt transforms
- */
-class TransformerNode extends DefaultHandler {
-
- private TransformerHandler transformerHandler;
-
- /**
- * This is part of a two phase construction. Call this, then call
- * initResult.
- *
- * @param xsltTemplates
- * for transform
- * @throws FOPException
- * for general errors
- */
- public TransformerNode(Templates xsltTemplates) throws FOPException {
- try {
- TransformerFactory transFact = TransformerFactory.newInstance();
- SAXTransformerFactory saxTFactory = ((SAXTransformerFactory)transFact);
- transformerHandler = saxTFactory.newTransformerHandler(xsltTemplates);
- } catch (TransformerConfigurationException t) {
- throw new FOPException(t);
- }
- }
-
- /**
- * Call this after calling constructor for xsltFile only above.
- *
- * @param result
- * of transform
- */
- public void initResult(Result result) {
- transformerHandler.setResult(result);
- }
-
- /******************** start of ContentHandler ***************************/
- /** {@inheritDoc} */
- public void setDocumentLocator(Locator locator) {
- transformerHandler.setDocumentLocator(locator);
- }
-
- /** {@inheritDoc} */
- public void startDocument() throws SAXException {
- transformerHandler.startDocument();
- }
-
- /** {@inheritDoc} */
- public void endDocument() throws SAXException {
- transformerHandler.endDocument();
- }
-
- /** {@inheritDoc} */
- public void processingInstruction(String target, String data) throws SAXException {
- transformerHandler.processingInstruction(target, data);
- }
-
- /** {@inheritDoc} */
- public void startElement(String uri, String local, String raw, Attributes attrs)
- throws SAXException {
- AttributesImpl ai = new AttributesImpl(attrs);
- transformerHandler.startElement(uri, local, raw, ai);
- }
-
- /** {@inheritDoc} */
- public void characters(char[] ch, int start, int length) throws SAXException {
- transformerHandler.characters(ch, start, length);
- }
-
- /** {@inheritDoc} */
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- transformerHandler.ignorableWhitespace(ch, start, length);
- }
-
- /** {@inheritDoc} */
- public void endElement(String uri, String local, String raw) throws SAXException {
- transformerHandler.endElement(uri, local, raw);
- }
-
- /** {@inheritDoc} */
- public void skippedEntity(String string) throws SAXException {
- transformerHandler.skippedEntity(string);
- }
-
- /** {@inheritDoc} */
- public void startPrefixMapping(String string, String string1) throws SAXException {
- transformerHandler.startPrefixMapping(string, string1);
- }
-
- /** {@inheritDoc} */
- public void endPrefixMapping(String string) throws SAXException {
- transformerHandler.endPrefixMapping(string);
- }
-
- /***************************** LexicalHandlerImpl **************************/
- /**
- * @param name
- * - param1
- * @param pid
- * - param2
- * @param lid
- * - param3
- * @throws SAXException
- * - if parser fails
- */
- public void startDTD(String name, String pid, String lid) throws SAXException {
- transformerHandler.startDTD(name, pid, lid);
- }
-
- /**
- * End of DTD
- *
- * @throws SAXException
- * - if parser fails
- */
- public void endDTD() throws SAXException {
- transformerHandler.endDTD();
- }
-
- /**
- * startEnitity.
- *
- * @param string
- * - param 1
- * @throws SAXException
- * - if parser fails
- */
- public void startEntity(String string) throws SAXException {
- transformerHandler.startEntity(string);
- }
-
- /**
- * end Entity
- *
- * @param string
- * - param 1
- * @throws SAXException
- * - if paser fails
- */
- public void endEntity(String string) throws SAXException {
- transformerHandler.endEntity(string);
- }
-
- /**
- * Start of CDATA section
- *
- * @throws SAXException
- * - parser fails
- */
- public void startCDATA() throws SAXException {
- transformerHandler.startCDATA();
- }
-
- /**
- * endCDATA section
- *
- * @throws SAXException
- * - if paser fails
- */
- public void endCDATA() throws SAXException {
- transformerHandler.endCDATA();
- }
-
- /**
- *
- * @param charArray
- * - the characters
- * @param int1
- * - param 2
- * @param int2
- * - param 3
- * @throws SAXException
- * - if paser fails
- */
- public void comment(char[] charArray, int int1, int int2) throws SAXException {
- transformerHandler.comment(charArray, int1, int2);
- }
-
- /******************** End of Lexical Handler ***********************/
-}
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java
index 11de99e33..0a65203cc 100644
--- a/src/java/org/apache/fop/apps/FOUserAgent.java
+++ b/src/java/org/apache/fop/apps/FOUserAgent.java
@@ -37,7 +37,7 @@ import org.apache.xmlgraphics.image.loader.ImageSessionContext;
import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext;
import org.apache.fop.Version;
-import org.apache.fop.accessibility.AccessibilityUtil;
+import org.apache.fop.accessibility.Accessibility;
import org.apache.fop.accessibility.StructureTree;
import org.apache.fop.events.DefaultEventBroadcaster;
import org.apache.fop.events.Event;
@@ -655,7 +655,7 @@ public class FOUserAgent {
*/
public void setAccessibility(boolean accessibility) {
if (accessibility) {
- getRendererOptions().put(AccessibilityUtil.ACCESSIBILITY, Boolean.TRUE);
+ getRendererOptions().put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
}
}
@@ -664,7 +664,7 @@ public class FOUserAgent {
* @return true if accessibility is enabled
*/
public boolean isAccessibilityEnabled() {
- Boolean enabled = (Boolean)this.getRendererOptions().get(AccessibilityUtil.ACCESSIBILITY);
+ Boolean enabled = (Boolean)this.getRendererOptions().get(Accessibility.ACCESSIBILITY);
if (enabled != null) {
return enabled.booleanValue();
} else {
diff --git a/src/java/org/apache/fop/apps/Fop.java b/src/java/org/apache/fop/apps/Fop.java
index 9dfa70325..07fd4c0a4 100644
--- a/src/java/org/apache/fop/apps/Fop.java
+++ b/src/java/org/apache/fop/apps/Fop.java
@@ -24,7 +24,7 @@ import java.io.OutputStream;
import org.xml.sax.helpers.DefaultHandler;
-import org.apache.fop.accessibility.AccessibilityUtil;
+import org.apache.fop.accessibility.Accessibility;
import org.apache.fop.fo.FOTreeBuilder;
/**
@@ -112,7 +112,7 @@ public class Fop {
createDefaultHandler();
}
if (this.foUserAgent.isAccessibilityEnabled()) {
- return AccessibilityUtil.decorateDefaultHandler(this.foTreeBuilder, foUserAgent);
+ return Accessibility.decorateDefaultHandler(this.foTreeBuilder, foUserAgent);
} else {
return this.foTreeBuilder;
}
diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java
index e0dc0a057..043dfe3c8 100644
--- a/src/java/org/apache/fop/cli/CommandLineOptions.java
+++ b/src/java/org/apache/fop/cli/CommandLineOptions.java
@@ -36,7 +36,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.fop.Version;
-import org.apache.fop.accessibility.AccessibilityUtil;
+import org.apache.fop.accessibility.Accessibility;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.FopFactory;
@@ -342,7 +342,7 @@ public class CommandLineOptions {
} else if (args[i].equals("-if")) {
i = i + parseIntermediateFormatOption(args, i);
} else if (args[i].equals("-a")) {
- this.renderingOptions.put(AccessibilityUtil.ACCESSIBILITY, Boolean.TRUE);
+ this.renderingOptions.put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
} else if (args[i].equals("-v")) {
/* Currently just print the version */
printVersion();
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java b/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
index 52d97fa31..3d68812b1 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
@@ -37,7 +37,7 @@ import org.apache.xmlgraphics.xmp.Metadata;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
-import org.apache.fop.accessibility.AccessibilityUtil;
+import org.apache.fop.accessibility.Accessibility;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.extensions.xmp.XMPMetadata;
import org.apache.fop.pdf.PDFAMode;
@@ -164,7 +164,7 @@ class PDFRenderingUtil implements PDFConfigurationConstants {
}
if (this.pdfAMode.isPDFA1LevelA()) {
//Enable accessibility if PDF/A-1a is enabled because it requires tagged PDF.
- userAgent.getRendererOptions().put(AccessibilityUtil.ACCESSIBILITY, Boolean.TRUE);
+ userAgent.getRendererOptions().put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
}
s = (String)userAgent.getRendererOptions().get(PDF_X_MODE);
if (s != null) {
diff --git a/src/java/org/apache/fop/util/TransformerDefaultHandler.java b/src/java/org/apache/fop/util/TransformerDefaultHandler.java
new file mode 100644
index 000000000..cf07cc836
--- /dev/null
+++ b/src/java/org/apache/fop/util/TransformerDefaultHandler.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.util;
+
+import javax.xml.transform.sax.TransformerHandler;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.DefaultHandler2;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * A DefaultHandler implementation that delegates all the method calls to a
+ * {@link TransformerHandler} instance.
+ */
+public class TransformerDefaultHandler extends DefaultHandler2 {
+
+ private TransformerHandler transformerHandler;
+
+ /**
+ * Creates a new instance delegating to the given TransformerHandler object.
+ *
+ * @param transformerHandler the object to which all the method calls will
+ * be delegated
+ */
+ public TransformerDefaultHandler(TransformerHandler transformerHandler) {
+ this.transformerHandler = transformerHandler;
+ }
+
+ /**
+ * Returns the delegate TransformerHandler instance.
+ *
+ * @return the object to which all method calls are delegated
+ */
+ public TransformerHandler getTransformerHandler() {
+ return transformerHandler;
+ }
+
+ /** {@inheritDoc} */
+ public void setDocumentLocator(Locator locator) {
+ transformerHandler.setDocumentLocator(locator);
+ }
+
+ /** {@inheritDoc} */
+ public void startDocument() throws SAXException {
+ transformerHandler.startDocument();
+ }
+
+ /** {@inheritDoc} */
+ public void endDocument() throws SAXException {
+ transformerHandler.endDocument();
+ }
+
+ /** {@inheritDoc} */
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ transformerHandler.startPrefixMapping(prefix, uri);
+ }
+
+ /** {@inheritDoc} */
+ public void endPrefixMapping(String string) throws SAXException {
+ transformerHandler.endPrefixMapping(string);
+ }
+
+ /** {@inheritDoc} */
+ public void startElement(String uri, String localName, String qName, Attributes attrs)
+ throws SAXException {
+ AttributesImpl ai = new AttributesImpl(attrs);
+ transformerHandler.startElement(uri, localName, qName, ai);
+ }
+
+ /** {@inheritDoc} */
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ transformerHandler.endElement(uri, localName, qName);
+ }
+
+ /** {@inheritDoc} */
+ public void characters(char[] ch, int start, int length) throws SAXException {
+ transformerHandler.characters(ch, start, length);
+ }
+
+ /** {@inheritDoc} */
+ public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
+ transformerHandler.ignorableWhitespace(ch, start, length);
+ }
+
+ /** {@inheritDoc} */
+ public void processingInstruction(String target, String data) throws SAXException {
+ transformerHandler.processingInstruction(target, data);
+ }
+
+ /** {@inheritDoc} */
+ public void skippedEntity(String name) throws SAXException {
+ transformerHandler.skippedEntity(name);
+ }
+
+ /** {@inheritDoc} */
+ public void notationDecl(String name, String publicId, String systemId) throws SAXException {
+ transformerHandler.notationDecl(name, publicId, systemId);
+ }
+
+ /** {@inheritDoc} */
+ public void unparsedEntityDecl(String name, String publicId, String systemId,
+ String notationName) throws SAXException {
+ transformerHandler.unparsedEntityDecl(name, publicId, systemId, notationName);
+ }
+
+ /** {@inheritDoc} */
+ public void startDTD(String name, String pid, String lid) throws SAXException {
+ transformerHandler.startDTD(name, pid, lid);
+ }
+
+ /** {@inheritDoc} */
+ public void endDTD() throws SAXException {
+ transformerHandler.endDTD();
+ }
+
+ /** {@inheritDoc} */
+ public void startEntity(String name) throws SAXException {
+ transformerHandler.startEntity(name);
+ }
+
+ /** {@inheritDoc} */
+ public void endEntity(String name) throws SAXException {
+ transformerHandler.endEntity(name);
+ }
+
+ /** {@inheritDoc} */
+ public void startCDATA() throws SAXException {
+ transformerHandler.startCDATA();
+ }
+
+ /** {@inheritDoc} */
+ public void endCDATA() throws SAXException {
+ transformerHandler.endCDATA();
+ }
+
+ /** {@inheritDoc} */
+ public void comment(char[] charArray, int start, int length) throws SAXException {
+ transformerHandler.comment(charArray, start, length);
+ }
+
+}