qiuwei / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
1 stars 1 forks source link

Nested grammars in RNG->XSD conversion #78

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Providing RNG schema

When I try to convert my RNG to XSD, I see a bunch of errors saying:
"sorry, nested grammars are not yet supported"

Am I doing smth wrong, or nested grammars are simply not supported for this
type of conversion. If so, is it going to be implemented?

Vyacheslav

Original issue reported on code.google.com by vyacheslav.zholudev on 12 May 2009 at 1:30

GoogleCodeExporter commented 8 years ago
This is currently classified as a Defect. It's really an enhancement request. 
I'd add my vote for Trang support for 
nested grammars. Even support for a single nesting level (as opposed to 
arbitrary nesting level) would be 
adequate for 99% of practically encountered cases, I'd bet.

Original comment by madden.jf@gmail.com on 19 Nov 2009 at 10:52

GoogleCodeExporter commented 8 years ago
I realized that I can flatten the rng before converting and pretty much bypass 
the problem. So not so urgent.

Original comment by madden.jf@gmail.com on 19 Nov 2009 at 11:11

GoogleCodeExporter commented 8 years ago
We use relax-ng format to define large Canonical Datamodels. These have 
hierachical stuctures so we can reuse definitions and to ensure consistence 
over the various message-schemes in the reoccuring elements. 

Converting these to xsd is not possible in an easy way. Flattening by jing 
simplify is not really a solution, because jing is not able to establish in 
multiple (levels of) includes/externals that in fact the same definition is 
used. 

As a result Jing 'resolves' this as a name conflict and introduces names like 
someElement_1, someElement_2 etc. for each additional include. The conversion 
to XSD becomes ugly and unnecessary complex. This becomes a real problem when 
the XSD is fed into tools like JAXB.

When this is solved the great advantage of using Relax-ng for defining 
Canonical Datamodels would even be greater.

Original comment by labberdo...@gmail.com on 9 Jan 2013 at 10:15