jkesselm 00/10/25 14:26:26
Modified: java/src/org/apache/xalan/processor
CompiledStylesheetBundle.java
CompilingStylesheetHandler.java
Log:
Cleanup: Reloading bundle should yield a TraX Templates object, rather than
exposing our internal Stylesheet.
Revision Changes Path
1.4 +3 -3
xml-xalan/java/src/org/apache/xalan/processor/CompiledStylesheetBundle.java
Index: CompiledStylesheetBundle.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompiledStylesheetBundle.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CompiledStylesheetBundle.java 2000/10/25 19:15:03 1.3
+++ CompiledStylesheetBundle.java 2000/10/25 21:26:24 1.4
@@ -277,12 +277,12 @@
* Xalan code was changed between when the bundle was created and when it
* is being reloaded.
*/
- public Stylesheet loadBundle(String filename)
+ public org.apache.trax.Templates loadBundle(String filename)
throws java.io.IOException,java.lang.ClassNotFoundException
{
java.io.InputStream is=null;
java.io.ObjectInputStream os=null;
- Stylesheet ss=null;
+ org.apache.trax.Templates ss=null;
try
{
@@ -292,7 +292,7 @@
is=cl.getResourceAsStream("Stylesheet.ser");
// Read objects from the .ser, loading from bundle if
necessary
os=new ClassLoaderObjectInputStream(cl,is);
- ss=(Stylesheet)os.readObject();
+ ss=(org.apache.trax.Templates)os.readObject();
}
finally
{
1.11 +12 -7
xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetHandler.java
Index: CompilingStylesheetHandler.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CompilingStylesheetHandler.java 2000/10/23 15:23:27 1.10
+++ CompilingStylesheetHandler.java 2000/10/25 21:26:24 1.11
@@ -240,7 +240,7 @@
{
ElemTemplate instance=source;
- String
className=generateUniqueClassName("org.apache.xalan.processor.ACompiledTemplate");
+ String
className=generateUniqueClassName("org.apache.xalan.processor.ACompiledTemplate");
try
{
@@ -1023,11 +1023,11 @@
return resolved;
}
- static long templateCounter=0;
- /** There is probably a serious implementation of this
- already existing, so I'm not going to spend a great
- deal of time or effort on it in the prototype.
- */
+ /** Generate a mostly-unique class name.
+ * The longterm answer here is File.createTempFile... but that
+ * requires JDK 1.2 or above.
+ */
+ static int templateCounter=0;
String generateUniqueClassName(String basename)
{
//TODO: ***** ISSUE: CLASS NAMING. This is kluged
@@ -1093,7 +1093,12 @@
return className;
}
-
+
+ /** Subroutine: Like p.waitFor, but discards the InterruptedException
+ * and goes right back into a wait.
+ * @param Process p to be waited for
+ * @return the exitValue() of the process.
+ */
int waitHardFor(Process p)
{
boolean done=false;