Processor.setConfigurationProperty() - Deprecated
My Java application has the following two lines of code, which are working:
DocxGeneratingOutputUriResolver outputResolver = new DocxGeneratingOutputUriResolver(outDir, templateDoc, log);
However, using the Eclipse IDE 2020-12, I am getting this message on the usage of the Processor.setConfigurationProperty(): "Deprecated. since 9.9 - use setConfigurationProperty(Feature, Object)."
I would prefer to upgrade my application to use either of the suggested methods: Xslt30Transformer.setResultDocumentHandler(java.util.function.Function) or XsltController.setResultDocumentResolver(ResultDocumentResolver) instead.
I have found some simple examples online on how to use them, but they are such a leap from my currently deprecated methods, I haven't a clue on how to upgrade things.
Any support is kindly appreciated.
#1 Updated by Michael Kay 17 days ago
The simplest change is just to change
This has two benefits: it gives stronger type checking, and it means we don't have the overhead of matching the long supplied string against 150 candidate strings at run time.
#2 Updated by Raymond Lillibridge 17 days ago
This works when running from within the Eclipse IDE but not when using the newly generated Maven Installed jar file.
Getting this from the CMD:
Exception in thread "main" java.lang.ExceptionInInitializerError at com.municode.jswpx2docx.xml2docx.MakeDocx.transformXml(MakeDocx.java:303) at com.municode.jswpx2docx.xml2docx.MakeDocx.handleCommandLine(MakeDocx.java:255) at com.municode.docbook2docx.MakeDocx.main(MakeDocx.java:21) Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found. at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:571) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:596) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:583) at com.municode.jswpx2docx.xml2docx.generator.DocxGeneratingOutputUriResolver.<clinit>(DocxGeneratingOutputUriResolver.java:27)
Is there anything I should make sure to set in my pom.xml file for Saxon?
<!-- https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE --> <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> <version>10.3</version> </dependency>
Please register to edit this issue