Allow String for http://saxon.sf.net/feature/traceListener
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
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.
Anonymous
Patch for Configuration.java
Logged In: YES
user_id=251681
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.
Logged In: YES
user_id=251681
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.
lB2YD4 fsitlosclcwz, [url=http://yapjurrwdqce.com/]yapjurrwdqce[/url], [link=http://zuwlzqjkzlwv.com/]zuwlzqjkzlwv[/link], http://hlokmmslmfqu.com/