Subjects
Home
Xalan extension functions
Fomatting question serializing DOM with pretty print
xalan with pull parser
Cannot find the declaration
Apache Xalan drop support to run on JRE 1 1 x
Why does Doctype change processing of a document
Node set to XML string via Java extensions in Xalan J: possible?
Templates/Transformers + thread safety???
Problem evaluating xpath with muliple prefix with different namespace
remove an arbitrary attribute from xsl output
Xalan3 XSLT 2 0 XPath 2 0 support?
Problem using compiled translets with Xalan !!
Xalan and jstl 1 1 problem with transform tag
NullPointer in DOM2DTM getLocalName
URIResolvers base parameter with xsltc and cascaded imports
Performance problem for Xalan J on intel dual core
Standard libraries in JAXP?
Serializing a DOM tree to XML file, customize entities replacement
Library Conflict Involving BCEL Library
A question on how users are using <xsl:message >
Kevin Cormier as a new Apache Xalan J committer
Struggling to iterate over tokenized string
Xalan count() trouble
Problem with recursive xpath
Error when switching to java 1 5
document( ' ')
Problem with Xalan2 7 0 transformation
cr/lf options
entity encoded XML
can xalan transform 2 xml using one xslt?
Xalan J JIRA defect review Monday October 16, 2006 from 2:00 to 3:30 pm ED
xsl transform with cdata section elements
xslt parameters not expanded
Weird behavior of XPath evaluate()
How to avoid <xsl:message > instruction prints stylesheet file informations ?
Cannot find SimpleTransform subdirectory after installing Xalan J
recover from document not found exceptions
jdk1 5 and Xalan jar differences?
Performance Issue
Error/Bug adding floating point numbers
XPathAPI: eval exp using nodes with default namespace
modifying xalan to output invalid XML
NullPointerException
mege two separate xml nodes into one
Is this a XALAN document identification bug?
is StylesheetRoot really java io Serializable ?
transform() fails for DOMSource but succeeds for StreamSource
Thoughts on Transformer parameter passing
HELP, Xalan and jstl 1 1 problem with transformer
Problem with XPath namespace axis?
string utils:replace deleting search string if replacement string is an HTML
help with enumeration values pls
xalan 2 5 1 vs 2 7 performance question
How to insert/update in XML document
HTML Serialization and Handling of Ampersands in HREF Attributes
XHTML link tag stripping
SystemId Unknown; Line #24; Column #49; java lang NullPointerException
xpath text() help
Apostrophe problem with xalan 2 7 0
How to set variables in XML document?
Links
Home
Oracle database error code ...
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
is StylesheetRoot really java.io.Serializable ?

is StylesheetRoot really java.io.Serializable ?

2007-08-01       - By Christine Li
Reply:     1     2     3  

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: jycli@(protected)



tiberiu <tiberiu_caprita@(protected)>
01/08/2007 03:42 PM

To
xalan-j-users@(protected)
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.


<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">It looks like a bug in the code. Please
open a bug report for it http://issues.apache.org/jira/browse/XALANJ</font>
<br>
<br><font size=2 face="sans-serif">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. </font>
<br>
<br><font size=2 face="sans-serif">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</font>
<br>
<br><font size=2 face="sans-serif">Hope it helps,</font>
<br>
<br><font size=2 face="sans-serif">Christine Li<br>
XSLT Development<br>
IBM Toronto Lab<br>
Tel: (905)413-2601<br>
Email: jycli@(protected)</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>tiberiu &lt;tiberiu_caprita
@(protected)&gt;</b>
</font>
<p><font size=1 face="sans-serif">01/08/2007 03:42 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">xalan-j-users@(protected)</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">is StylesheetRoot really java.io.Serializable
?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>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,
<i>ExtensionNamespaceSupport</i> 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 &quot;Unknown Error in
XPath&quot; Error because of the following Code from <i>ExtensionsTable</i>
class: Vector extensions = m_sroot.getExtensions(); for (int i = 0; i &lt;
<i>extensions.size()</i>; 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. <br>
</font>
<hr><font size=3>View this message in context: </font><a href="http://www
.nabble.com/is-StylesheetRoot-really-java.io.Serializable---tf4202280.html
#a11952525"><font size=3 color=blue><u>is
StylesheetRoot really java.io.Serializable ?</u></font></a><font size=3><br>
Sent from the </font><a href="http://www.nabble.com/Xalan---J---Users-f275.html
"><font size=3 color=blue><u>Xalan
- J - Users mailing list archive</u></font></a><font size=3> at Nabble.com.<
/font>
<br>