oasis-open / dita-rng-converter

OASIS TC Open Repository: The DITA RNG Converter provides cross-platform tools for generating DITA-conforming DTD- and XSD-format versions of RELAX NG DITA grammars: document type shells, vocabulary modules, and constraint modules. It makes it as easy as possible to develop and maintain DITA grammars by allowing use of RELAX NG syntax.
https://github.com/oasis-open/dita-rng-converter
Apache License 2.0
7 stars 10 forks source link

Inifinite loop generating DTDs #5

Closed drmacro closed 6 years ago

drmacro commented 8 years ago

[Issue originally posted against the DITA Community repository. Copying here for resolution.]

java.io.FileNotFoundException occurred when converting own RELAX NG specialization to DTD.

Executing:
"c:\program files\oxygen xml editor 17\jre/bin/java" -Xmx384m "-Doxygen.org.apache.xerces.xni.parser.XMLParserConfiguration=org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration" -classpath "C:\Program Files\Oxygen XML Editor 17\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor 17\tools\ant" org.apache.tools.ant.launch.Launcher -lib "D:\DITA-OT\dita-ot-2.1.0\lib\commons-io.jar" -lib "C:\Program Files\Oxygen XML Editor 17\classes" -lib "C:\Program Files\Oxygen XML Editor 17\lib\oxygen.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\oxygenAuthor.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\oxygenDeveloper.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\oxygenEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\oxygenAuthorEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\oxygenDeveloperEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\resolver.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\org.eclipse.wst.xml.xpath2.processor_1.2.0.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\xml-apis.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\xercesImpl.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\commons-io-1.3.1.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\commons-logging-1.1.3.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\log4j.jar" -lib "D:\DITA-OT\dita-ot-2.1.0\lib\commons-codec-1.4.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\jing.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\saxon9ee.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\saxon.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\xmlgraphics-commons-1.5.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\fop.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\batik-all-1.7.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\js.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\xml-apis-ext.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\avalon-framework-4.2.0.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\jeuclid-core.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\jeuclid-fop.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\jai_tiff.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\jh.jar" -lib "D:\DITA-OT\dita-ot-2.1.0\lib\jsearch.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\lucene-core-4.0.0.jar" -lib "C:\Program Files\Oxygen XML Editor 17\lib\lucene-analyzers-common-4.0.0.jar" -lib "D:\DITA-OT\dita-ot-2.1.0\plugins\com.oxygenxml.webhelp\lib\lucene-analyzers-kuromoji-4.0.0.jar" -lib "D:\DITA-OT\dita-ot-2.1.0\plugins\com.oxygenxml.webhelp\lib\xhtml-indexer.jar" -lib "D:\DITA-OT\dita-ot-2.1.0\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.1.jar" -lib "D:\DITA-OT\dita-ot-2.1.0" -lib "D:\DITA-OT\dita-ot-2.1.0\lib\dost-patches.jar" -lib "D:\DITA-OT\dita-ot-2.1.0\lib" -lib "D:\DITA-OT\dita-ot-2.1.0\lib\dost.jar" -f "D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes/../../build.xml" "-Dtranstype=rng2dtd" "-Dbasedir=D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes" "-Doutput.dir=D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes" "-Ddita.temp.dir=D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes/temp" "-Dpdf.formatter=fop" "-Dargs.debug=yes" "-Dargs.input=D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes\doctypes\rng\base\rng\basemap.rng" "-Ddita.dir=D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes/../.." "-Dxep.failOnError=true" "-DbaseJVMArgLine=-Xmx384m" "-DDOT_VERSION=2.1.0"

Buildfile: D:\DITA-OT\dita-ot-2.1.0\build.xml

init:

rng.generate-dtd:
    [mkdir] Created dir: D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes\generationManifests
    [mkdir] Created dir: D:\DITA-OT\dita-ot-2.1.0\plugins\com.antennahouse.dita.dita13.doctypes\dtd
     [echo] 

BUILD FAILED
D:\DITA-OT\dita-ot-2.1.0\build.xml:41: The following error occurred while executing this line:
D:\DITA-OT\dita-ot-2.1.0\plugins\org.dita-community.com.dita-rng-converter.converter\build_transtype-rng2dtd.xml:37: The following error occurred while executing this line:
java.io.FileNotFoundException: D:\DITA-OT\dita-ot-2.1.0\plugins\org.dita-community.com.dita-rng-converter.converter\build.xml (指定されたファイルが見つかりません。)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:250)
    at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
    at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:392)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds
The process finished with exit code: 1

Actually ${dita.plugin.org.oasis-open.dita.rng.converter.dir}/build.xml does not included in plug-in folder.

At this moment com.antennahouse.dita.dita13.doctypes works fine for our authoring. But it is specialized by RELAX NG. No consideration was made to convert it to DTD files.

drmacro commented 8 years ago

[Original comment from DITA Community issue]

I was able to recreate the behavior and it doesn't appear to be related to the Antenna-House-specific modules (that is, I get the same failure if I replace or comment out the references to the AH-specific files.

I'll investigate but it may still be a day or two.

Note that I had to use the 1.8.5 OT as my base (copying over the 1.3 doctypes plugin from the 2.x OT) and swap in the 9.6 version of Saxon, which the RNG transform depends on (the 9.1 version that comes out of the box with the OT lacks features I depend on here).

Also, the file build-plugins.xml generates working versions of the plugins that include the build.xml file.

drmacro commented 6 years ago

This appears to be fixed and/or obsolete. Will be re-doing the OT plugins and can address there if it is still an issue.