curcuru 02/04/01 07:26:19
Modified: test/java/src/org/apache/qetest/xslwrapper
TraxSAXWrapper.java
Log:
Make setting of the DeclHandler optional, since the JAXP spec doesn't
actually require implementers to support this (we now catch any
wayward exceptions and ignore them here)
Revision Changes Path
1.6 +13 -4
xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java
Index: TraxSAXWrapper.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/xslwrapper/TraxSAXWrapper.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TraxSAXWrapper.java 21 Dec 2001 22:53:27 -0000 1.5
+++ TraxSAXWrapper.java 1 Apr 2002 15:26:19 -0000 1.6
@@ -99,7 +99,7 @@
* our getProcessorInfo() method.</p>
*
* @author Shane Curcuru
- * @version $Id: TraxSAXWrapper.java,v 1.5 2001/12/21 22:53:27 curcuru Exp $
+ * @version $Id: TraxSAXWrapper.java,v 1.6 2002/04/01 15:26:19 curcuru Exp $
*/
public class TraxSAXWrapper extends TransformWrapperHelper
{
@@ -274,9 +274,18 @@
xmlReader.setProperty(
"http://xml.org/sax/properties/lexical-handler",
stylesheetHandler);
- xmlReader.setProperty(
- "http://xml.org/sax/properties/declaration-handler",
- stylesheetHandler);
+
+ // Also attempt to set as a DeclHandler, which Xalan-J
+ // supports even though it is not required by JAXP
+ // Ignore exceptions for other processors since this
+ // is not a required setting
+ try
+ {
+ xmlReader.setProperty(
+ "http://xml.org/sax/properties/declaration-handler",
+ stylesheetHandler);
+ }
+ catch (SAXException se) { /* no-op - ignore */ }
// added by sb. Tie together DTD and other handling
xmlReader.setDTDHandler(stylesheetHandler);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]