Hi,

It looks like a bug in the code. Please open a bug report for it 
http://issues.apache.org/jira/browse/XALANJ

By the way, I did some performance comparison long time ago, it showed 
that serialize and deserialize a Template object is slower than regenerate 
a Template object from a stylesheet. 

If you want to get better performance, you can use XSLTC, you can compile 
a stylesheet into a translet (a java class), then you can do 
transformation later. More details please refer to 
http://xml.apache.org/xalan-j/xsltc_usage.html

Hope it helps,

Christine Li
XSLT Development
IBM Toronto Lab
Tel: (905)413-2601
Email: [EMAIL PROTECTED]



tiberiu <[EMAIL PROTECTED]> 
01/08/2007 03:42 PM

To
xalan-j-users@xml.apache.org
cc

Subject
is StylesheetRoot really java.io.Serializable ?






Hi, in xalan documentation there is a hint to use Templates and to cache 
them, in order to increase performance. I need to cache them on disk, so 
that I tried to use (java.io) Serializable interface. The Problem is that 
even if StyleSheetRoot (the Templates Object) implements Serializable, 
ExtensionNamespaceSupport doesn't. So, trying to save a StylesheetRoot 
with xalan2.4.0 crashes, in 2.7.0 I didn't obtain an error but the read 
Class from such a File return on method StylesheetRoot.getExtensions() a 
null. This null is at the end converted in an "Unknown Error in XPath" 
Error because of the following Code from ExtensionsTable class: Vector 
extensions = m_sroot.getExtensions(); for (int i = 0; i < 
extensions.size(); i++) Without these Extensions the Templates doesn't 
know defined Namespaces. My Question is if it is a possibility to 
serialize StylesheetRoot in a File, and to can use that serialized form in 
order to generate a good Transformer. Thanks for an answer. 
View this message in context: is StylesheetRoot really 
java.io.Serializable ?
Sent from the Xalan - J - Users mailing list archive at Nabble.com.

Reply via email to