xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott_B...@lotus.com
Subject Re: Mission Impossible 3: Serializing Templates...
Date Mon, 04 Jun 2001 13:21:22 GMT

Yeah, I don't think serialization of templates are part of our standard
smoke tests, which they clearly should be.  Sorry.  Submit a bugzilla bug
and we'll try and make this better.

-scott




                                                                                         
                         
                    Rob Stanley                                                          
                         
                    <Rob.Stanley@        To:     "'xalan-dev@xml.apache.org'" <xalan-dev@xml.apache.org>
          
                    Geac.com>            cc:     (bcc: Scott Boag/CAM/Lotus)          
                            
                                         Subject:     Mission Impossible 3: Serializing Templates...
              
                    06/04/2001                                                           
                         
                    08:03 AM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    xalan-dev                                                            
                         
                                                                                         
                         
                                                                                         
                         




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







Mime
View raw message