You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull request dita-ot/dita-ot#2604 adds a simple API to invoke DITA-OT from Java. The Developer Reference and related documentation should be extended per @jelovirt's recommendations:
As a developer, my preference would be to ship Javadoc with our HTML documentation and have a tutorial topic on how to use it. The API is small, so a single topic should be enough.
The text was updated successfully, but these errors were encountered:
The goal of adding the new Java API to DITA-OT is to allow users to embed DITA-OT more easily to Java programs. When using the API, programmers don't need to know or care that DITA-OT uses Ant, they can just use Java. The ant shell script will handle the classpath setup for the user, but when using the API the classpath setup should be done as part of normal classpath configuration.
Example usage:
// Create reusable processor factory with DITA-OT base directory and temporary directoryProcessorFactorypf = ProcessorFactory.newInstance(ditaDir);
pf.setBaseTempDir(tempDir);
// Create a processor using the factor and configure the processorProcessorp = pf.newProcessor("html5")
.setInput(mapFile)
.setOutputDir(outDir)
.setProperty("nav-toc", "partial");
// Run conversionp.run();
By default, running DITA-OT via the API will generate a debug log to temporary directory; a custom SLF4J logger can be used to access log.
By default, processor will clean the temporary directory, but this can be disabled for cases where the processor failed.
Pull request dita-ot/dita-ot#2604 adds a simple API to invoke DITA-OT from Java. The Developer Reference and related documentation should be extended per @jelovirt's recommendations:
The text was updated successfully, but these errors were encountered: