Page 1 of 1

Stack overflow problem with DTD -> RNG conversion

Posted: Mon Jan 16, 2006 7:56 pm
by dsewell
I have a long TEI-compatible DTD that is not behaving properly when I use oXygen 7 to convert it to a RelaxNG schema (either XML or compact syntax). I don't have this problem when using Trang and Jing from the command line (using the jar files in the oXygen application directory). Platform is Mac OS X.

Two issues: (1) the generated .RNG file lacks a <start> element (it needs one to validate an XML document instance; the default behavior of command-line Trang is to add a <start> element to the grammar; (2) the correct .RNG file generated by command-line Trang works to validate XML files using Jing from the command line, but within oXygen I get a Java "class java.lang.StackOverflowError null" error.

The DTD is here:

http://lister.ei.virginia.edu/~drs2n/Temp/meptei3x.dtd

(On edit:) I just tried this with oXygen 6.2 on Windows. The missing <start> element is there, too, but I got no Java error--the corrected RelaxNG file validated correctly.

If you cannot duplicate the stack overflow error using the Mac OS X platform I can send details of my installation.

Posted: Tue Jan 17, 2006 5:16 pm
by george
Hi David,

For the start element, there is an option that you can access if you click on the Advanced options in the Trang dialog after you select the output as RNG for instance called "generate start". If you enable that you will get a schema containing a start pattern.

Best Regards,
George

Posted: Tue Jan 17, 2006 5:37 pm
by george
Hi David,

The stack overflow exception unfortunatelly is inside Jing, I reproduced that from command line like follows:

E:\workspace\oXygen>java -cp jing.jar com.thaiopensource.relaxng.util.Driver meptei3x.rng test.xml
Exception in thread "main" java.lang.StackOverflowError
at com.thaiopensource.relaxng.impl.DuplicateAttributeDetector.startChoice(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
...

Best Regards,
George