You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Roytman, Alex" <ro...@peacetech.com> on 2001/03/09 20:12:06 UTC

Transformer.setAttribute(), TraX & Subclassing TransformerImpl

Scott, 

I understand that it is too late to modify JAXP1.1 to add
Transformer.getAttribute(), Transformer.setAttribute()
But if you think it is a valuable idea could you possible add this
functionality to TransformerImp?
If not I will probably go with the approach you suggested - to subclass
transformer and tell TraX to instantiate the subclass. 
I do believe that there should be a way to pass some sort of external
execution context to Transformer so extension can access it
Right now I have to do it via XSL Parameters (very inconvenient because I
have to declare dummy parameters ....)

You mentioned that I "can derive a class from TransformerImpl, change your
JAXP 1.1 property to create your derived class" Is it documented somewhere?
I went through the code and only found this for TransformerFactory and also
I noticed that org.apache.xalan.templates.StylesheetRoot directly
instantiate TransformerImpl:

public class StylesheetRoot {
....
  public Transformer newTransformer()
  {
    return new TransformerImpl(this);
  }
....
}