diff options
author | Keiron Liddle <keiron@apache.org> | 2002-04-19 08:02:52 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-04-19 08:02:52 +0000 |
commit | 80c56fbdab2293a7d9d072e5fdf883507e041914 (patch) | |
tree | 22e47d3f1045e5506aadbca7c1eb4b3b0cc1f167 | |
parent | d2f7123b41536ff02304fc429a5756e976475f6b (diff) | |
download | xmlgraphics-fop-80c56fbdab2293a7d9d072e5fdf883507e041914.tar.gz xmlgraphics-fop-80c56fbdab2293a7d9d072e5fdf883507e041914.zip |
enforce users to call getParser so it can setup the xslt filter
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194736 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/org/apache/fop/apps/XSLTInputHandler.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/apache/fop/apps/XSLTInputHandler.java b/src/org/apache/fop/apps/XSLTInputHandler.java index 89ba30876..cf24a3ea4 100644 --- a/src/org/apache/fop/apps/XSLTInputHandler.java +++ b/src/org/apache/fop/apps/XSLTInputHandler.java @@ -33,6 +33,7 @@ public class XSLTInputHandler extends InputHandler { File xmlfile, xsltfile; boolean useOldTransform = false; + boolean gotParser = false; public XSLTInputHandler(File xmlfile, File xsltfile) { this.xmlfile = xmlfile; @@ -43,6 +44,9 @@ public class XSLTInputHandler extends InputHandler { * overwrites the method of the super class to return the xmlfile */ public InputSource getInputSource() { + if(!gotParser) { + throw new IllegalStateException("The method getParser() must be called and the parser used when using XSLTInputHandler"); + } if (useOldTransform) { try { java.io.Writer writer; @@ -88,6 +92,8 @@ public class XSLTInputHandler extends InputHandler { * */ public XMLReader getParser() throws FOPException { + gotParser = true; + XMLReader result = null; try { // try trax first |