Dear all,
I have some code that attempts to serialize Templates to disk thus (code
simplified) :=
String outFileName = "c:/stylesheets/foobar.templates";
//Create the Templates (actually
org.apache.xalan.templates.StylesheetRoot)...
SAXTransformerFactory transfactSAX =(SAXTransformerFactory)
TransformerFactory.newInstance();
Templates templates = transfactSAX.newTemplates(new
StreamSource("file:///c:/stylesheets/foobar.xsl")) ;
// Write the Templates to disk ...
FileOutputStream ostream = new FileOutputStream(outFileName);
java.io.ObjectOutputStream p = new
java.io.ObjectOutputStream(ostream);
p.writeObject(templates);
p.flush();
ostream.close();
The problem I have is that due (I think!) to the transient fields in
UnionPathIterator I cannot use
the deserialized template object later on, as most XPath statements throw
null pointer exceptions. I realize that
this overlaps the XSLTC project, but I would like to do this for other
project reasons.
Am I attempting the impossible?
Rob Stanley
GEAC Enterprise Solutions