I've been awaiting an answer to your question for a while, because I want
something similar. I would like to look up a Translet class name, and
construct a Templates object from that, thus eleminating compilation.

What have stopped me so far is that I do not want to put effort into
a solution that wont be supported by following XalanJ releases. Is there
any API for this that will go into XalanJ and that will stay?

i.e.

Class transclass = Class.forName(transclass);
Translet translet = (Translet)transclass.newInstance();
Templates template = new TransletTemplates(translet);


-----Original Message-----
From: Paul O'Neill [mailto:[EMAIL PROTECTED]]
Sent: den 5 juli 2001 13:36
To: [EMAIL PROTECTED]
Subject: XSLTC: creating a translet (template) object from a precompiled
translet ( .class file)
Importance: High


Hi,
        sorry if this is a stupid question but I am trying to resuse Translets
without recompiling the XSL source. (not from command line) and Im wondering
is there some way I can specify a .class file that I want to be used as my
translet object?

e.g
        if(compiledXSLFile.lastModified() < XSLSourceFile.lastModified())
        {
          Templates translet = tFactory.newTemplates(XSLSource);
        }
        else
        {
            Templates translet = new File(compiledXSLFile); ***what should go
here?*****
          }

thanks for any help,

Paul.

Reply via email to