Stack overflow problem with DTD -> RNG conversion

Having trouble installing Oxygen? Got a bug to report? Post it all here.
dsewell
Posts: 125
Joined: Mon Jun 09, 2003 6:02 pm
Location: Charlottesville, Virginia USA

Stack overflow problem with DTD -> RNG conversion

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply