From the XSLTC command line doc (Xalan 2.5.1):
If the use-classpath attribute is set to true, the translet will be loaded
from the CLASSPATH. This attribute is typically used in a case when the
translets are packaged in a prebuilt jar file which is included in the
CLASSPATH.
All the Trax/translet examples show this code:
String transletURI = args[1];
TransformerFactory tf = TransformerFactory.newInstance();
tf.setAttribute("use-classpath", Boolean.TRUE);
Transformer transformer = tf.newTransformer(new StreamSource(transletURI));
I intend to store the translet in a database and would like to use an
InputStream to create the transformer:
tf.setAttribute("use-classpath", Boolean.FALSE);
Transformer transformer = tf.newTransformer(new StreamSource(dbInputStream));
It doesn't appear that translets can be loaded without using the file system
and use-classpath attribute.
I would like to avoid writing the translet from the database to a temporary
location on the file system to load the translet. Is there any way to do
this?
Thanks,
Eric
- Re: Trax & Translets: use-classpath Eric_Powers
- Re: Trax & Translets: use-classpath Morris Kwan
