hanshuebner / jing-trang

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

Provide trang option to remove include/externalRef before output #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be useful if trang could perform various transformations on the
schema between the input and the output stage.  One obvious transformation
would be to perform some parts of the RELAX NG simplification process,
notably the transformations that get rid of include and externalRef. 

Original issue reported on code.google.com by jjc.jclark.com on 13 Nov 2008 at 12:08

GoogleCodeExporter commented 9 years ago
I'd love to see this feature implemented. On many occasions with trang I'd 
stumble
over an error-message like:

...base.rnc:46:38: error: sorry, externalRef is not yet supported

when trying to convert rnc-Schema (what I like to work with) into xsd (what my
employer demands).

Original comment by claus.kl...@gmail.com on 25 Nov 2008 at 12:26

GoogleCodeExporter commented 9 years ago
I agree this would be a very high priority for me, for the same reason as 
Claus: I much prefer to develop in rng, 
but my downstream schema consumers (e,g, XForms 1.1) want to see xsd.

Original comment by madden.jf@gmail.com on 3 Dec 2008 at 2:42

GoogleCodeExporter commented 9 years ago
It seems like this is important in the context of XSD.  See also issue 56.

Original comment by jjc.jclark.com on 7 Dec 2008 at 2:45

GoogleCodeExporter commented 9 years ago
When validating with JARV + Jing + rng-schema-file, I am experiencing noticeable
speed decreases when my schema file contains "include"s.  The dropoff seems to 
be
linear; every "include" adds two seconds to validation.  If I
simplify/flatten-out/inline the schema file, the performance issues goes away.  
When
I ran into this issue a few months ago, I chose to simplify the document 
instead of
digging into the validation code.

I remember using Trang (don't know which version) to convert an existing rng 
(with
"include"s) to a simplified rng.  It seems I can no longer do this with the 
current
Trang release.  Has the behavior changed and/or am I going crazy?

Thanks,

Luke

Original comment by lukewpat...@gmail.com on 5 Jan 2009 at 7:36

GoogleCodeExporter commented 9 years ago
This would solve the problem I am having. I use a system of modular Relax NG 
schemas to generate a large number of related schemas which have more or less 
features in them. When I translate to xsd, one module can affect another 
because Trang does some optimization in some cases that it cannot do in other 
cases. So for each output xsd I have to keep a whole set of modules - there is 
no efficiency to the modularization in the xsd. It would be somewhat better if 
I could "demodularize" the Relax NG and then translate that, so at least I 
would only have one file to deal with for each case. Also, I am told that JAXB 
works better on a monolithic schema than a modular one, and that is one of the 
destinations of the xsd that I am creating.

Original comment by taraAt...@gmail.com on 22 Mar 2011 at 9:38

GoogleCodeExporter commented 9 years ago
See the -s option from Jing, that will get you a simplified schema. Then pass 
that as input to Trang.

Regards,
George

Original comment by georgebina76 on 30 Mar 2011 at 11:50

GoogleCodeExporter commented 9 years ago
I have been using Jing -s for the last month or so, as suggested above. However 
there are several drawbacks to this. Jing -s performs a lot of transformations 
in addition to flattening which, at best, make the resulting schema harder to 
read, and at worst produce invalid code. (I'll report these issues separately). 
So it would be quite helpful to have an intermediate option - flatten to a 
monolithic schema but don't simplify further.

Original comment by taraAt...@gmail.com on 16 May 2011 at 6:23