morten 01/11/12 10:30:19
Modified: java/src/org/apache/xalan/xsltc/trax
TransformerFactoryImpl.java
Log:
Fix for properly creating a SAX InputSource from a TrAX InputStream for
encapsulating a stylesheet before it is compiled.
PR: bugzilla 4711 (I hope to God)
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.32 +4 -12
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
Index: TransformerFactoryImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- TransformerFactoryImpl.java 2001/11/09 10:01:35 1.31
+++ TransformerFactoryImpl.java 2001/11/12 18:30:19 1.32
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: TransformerFactoryImpl.java,v 1.31 2001/11/09 10:01:35 morten
Exp $
+ * @(#)$Id: TransformerFactoryImpl.java,v 1.32 2001/11/12 18:30:19 morten
Exp $
*
* The Apache Software License, Version 1.1
*
@@ -410,9 +410,7 @@
InputSource input = null;
String systemId = source.getSystemId();
- if (systemId == null) {
- systemId = "";
- }
+ if (systemId == null) ystemId = "";
try {
@@ -442,10 +440,8 @@
input = new InputSource(istream);
else if (reader != null)
input = new InputSource(reader);
- else if ((new File(systemId)).exists()) {
- input = new InputSource(
- new File(systemId).toURL().toExternalForm());
- }
+ else
+ input = new InputSource(systemId);
}
else {
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR);
@@ -459,10 +455,6 @@
throw new TransformerConfigurationException(err.toString());
}
catch (SecurityException e) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.FILE_ACCESS_ERR, systemId);
- throw new TransformerConfigurationException(err.toString());
- }
- catch (MalformedURLException e){
ErrorMsg err = new ErrorMsg(ErrorMsg.FILE_ACCESS_ERR, systemId);
throw new TransformerConfigurationException(err.toString());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]