keiron 02/04/19 01:02:52
Modified: src/org/apache/fop/apps XSLTInputHandler.java
Log:
enforce users to call getParser so it can setup the xslt filter
Revision Changes Path
1.9 +7 -1 xml-fop/src/org/apache/fop/apps/XSLTInputHandler.java
Index: XSLTInputHandler.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/XSLTInputHandler.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XSLTInputHandler.java 26 Oct 2001 09:26:58 -0000 1.8
+++ XSLTInputHandler.java 19 Apr 2002 08:02:52 -0000 1.9
@@ -1,5 +1,5 @@
/*
- * $Id: XSLTInputHandler.java,v 1.8 2001/10/26 09:26:58 keiron Exp $
+ * $Id: XSLTInputHandler.java,v 1.9 2002/04/19 08:02:52 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
@@ -33,6 +33,7 @@
File xmlfile, xsltfile;
boolean useOldTransform = false;
+ boolean gotParser = false;
public XSLTInputHandler(File xmlfile, File xsltfile) {
this.xmlfile = xmlfile;
@@ -43,6 +44,9 @@
* 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 XMLReader getParser() throws FOPException {
+ gotParser = true;
+
XMLReader result = null;
try {
// try trax first
Advertising
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]