You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dl...@apache.org on 2001/10/10 20:42:24 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/serialize CharInfo.java SerializerToXML.java
dleslie 01/10/10 11:42:24
Modified: java/src/org/apache/xalan/serialize CharInfo.java
SerializerToXML.java
Log:
Fix for bugzilla SPR 3159.
1. Revised SerializerToXML.init to attempt to create a CharInfo
with the entitesFileName from the output properties file (or
supplied by user) before turning the reference into an absolute
URI.
2. Removed paths to entitiesFileName from CharInfo constructor,
and adapted newer procedure (from TransformerFactory)
for loading stream resource.
Revision Changes Path
1.8 +12 -1 xml-xalan/java/src/org/apache/xalan/serialize/CharInfo.java
Index: CharInfo.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/serialize/CharInfo.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CharInfo.java 2001/07/28 00:25:58 1.7
+++ CharInfo.java 2001/10/10 18:42:24 1.8
@@ -131,14 +131,25 @@
try
{
+ try
+ {
+ ClassLoader cl = CharInfo.class.getClassLoader();
+ if (cl == null) {
+ is = ClassLoader.getSystemResourceAsStream(entitiesResource);
+ } else {
+ is = cl.getResourceAsStream(entitiesResource);
+ }
+ }
+ /* replaced with lines above (adapted from TransformerFactory) for getting a stream resource.
try {
java.lang.reflect.Method getCCL = Thread.class.getMethod("getContextClassLoader", NO_CLASSES);
if (getCCL != null) {
ClassLoader contextClassLoader = (ClassLoader) getCCL.invoke(Thread.currentThread(), NO_OBJS);
is = contextClassLoader.getResourceAsStream("org/apache/xalan/serialize/" + entitiesResource);
}
- }
+ } */
+
catch (Exception e) {}
if (is == null)
1.10 +3 -0 xml-xalan/java/src/org/apache/xalan/serialize/SerializerToXML.java
Index: SerializerToXML.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/serialize/SerializerToXML.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SerializerToXML.java 2001/07/06 15:48:44 1.9
+++ SerializerToXML.java 2001/10/10 18:42:24 1.10
@@ -456,6 +456,9 @@
}
if (null == m_charInfo)
+ m_charInfo = new CharInfo(entitiesFileName);
+
+ if (null == m_charInfo)
{
String absoluteEntitiesFileName;
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org