#14 Allow String for http://saxon.sf.net/feature/traceListener

Tony Graham

The value used for setting the
http://saxon.sf.net/feature/traceListener attribute of
net.sf.saxon.TransformerFactoryImpl currently has to be
an object that implements TraceListener.

However, if setting attributes for Saxon with the
<factory> and <attribute> sub-elements of Ant's xslt
task, the best you can do is set the value to be a String.

The attached patch attempts treats a String value as a
class name and attempts to instantiate and use an
object of the specified class.


  • Tony Graham

    Tony Graham - 2006-09-13

    Patch for Configuration.java

  • Michael Kay

    Michael Kay - 2006-09-13

    Logged In: YES

    I can see the problem, but I don't think this change is a
    particularly good idea. In the majority of cases, it's
    likely that a traceListener will be stateful, in particular,
    it will have an output writer of some kind. That's why in
    8.8 I've been moving away from specifying the listener on
    the Configuration object towards putting it on the Controller.

    Limitations of Ant as a programming language also don't seem
    to be a particularly good justification for ad-hoc changes
    Saxon's API.

    The whole business of supplying user-hooks is pretty messy
    in Saxon, I admit, but it's not clear that this change
    overall is an improvement.

  • Michael Kay

    Michael Kay - 2008-03-24

    Logged In: YES
    Originator: NO

    This has come up again more recently - again in the context of Ant - and I decided to add Configuration options in Saxon 9.1 so that all the user hooks can be nominated either as a string holding the class name, or as an instance of the class.

  • Nobody/Anonymous

    lB2YD4 fsitlosclcwz, [url=http://yapjurrwdqce.com/]yapjurrwdqce[/url], [link=http://zuwlzqjkzlwv.com/]zuwlzqjkzlwv[/link], http://hlokmmslmfqu.com/



Cancel  Add attachments