Closed SvenHaul closed 1 month ago
I added a static method SchematronTransformerFactory.setTransformerFactoryCustomizer (Consumer <TransformerFactory>)
so that you can customize the created TransformerFactory
to your needs. Hope that makes sense to you. Just apply the setting globally, before calling the first Schematron stuff.
Wow, this was super fast. And it works like a charm, thanks a million.
For anyone also using this from Spring Boot:
ph-schematron-api/src/main/java/com/helger/schematron/saxon/SchematronTransformerFactory.java
A https://www.saxonica.com/html/documentation12/javadoc/net/sf/saxon/lib/TraceListener.html allows to get intermediate results of the transformation. The listener can easily be added to the Saxon configuration, for example in a Spring Boot application. However, the SchematronTransformerFactory always creates its own instance with no outside access to the configuration.
It would be nice to have a configuration setting to enable Feature.COMPILE_WITH_TRACING to true, and state my own implementation of the TraceListener.
My use case for this particular request is that complex rules using functions are often hard to understand. So I want to present intermediate (function) results to the user as additional explanation, and the trace listener would give me easy access to this.