dizzzz / jing-trang

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

Handle externalRef when converting to XSD #56

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create 2 relax ng schemas; one with a dependency to another using
externalRef (in order to macro inject some relax ng constructs) 
2. use trang tool in Oxygen 10.
3. attempt to convert to Relax NG schema/Xml format to Xml schema

What is the expected output? What do you see instead?
- expect to at least be able to generated with warning but not blocking
error OR strip out externalRef and add documentation on order to curate Xml
schema later.

What version of the product are you using? On what operating system?
- Oxygen 10 on Windows Vista using Java 6.

Please provide any additional information below.
- this issue also related to another low priority issue asking to "strip"
out externalRef/include, etc.

Original issue reported on code.google.com by nalbarra...@gmail.com on 6 Dec 2008 at 11:52

GoogleCodeExporter commented 8 years ago
I think the only useful behaviour is to expand out the externalRef. This will 
also 
required expanding out nested grammars.  These features would also be useful 
for 
conversion to DTD, so it makes sense to implement them by performing 
transformations 
on the RELAX NG representation before conversion to XSD/DTD.  These 
transformations 
needed for a particularly output module to work would automatically be enabled 
when 
that output module is in use, but could also be invoked explicitly.  Hence the 
dependency on 51.

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

GoogleCodeExporter commented 8 years ago
In the meanwhile you can easily get an equivalent Relax NG schema without 
external
references and use that as input for Trang. There are only a few lines of code, 
I
posted a class that does that at
http://www.oxygenxml.com/forum/topic3234.html

Regards,
George

Original comment by birouri....@gmail.com on 7 Dec 2008 at 8:41

GoogleCodeExporter commented 8 years ago
Thanks for the suggestion.  I added issue 57 for this.

Original comment by jjc.jclark.com on 8 Dec 2008 at 12:51

GoogleCodeExporter commented 8 years ago
Thanks! Comment 2 belongs to me, sorry, I was on my laptop at home and did not
noticed it was logged in to a different Google account.

Original comment by georgebina76 on 8 Dec 2008 at 9:21

GoogleCodeExporter commented 8 years ago
Jim/George,

Thanks again.  Ironically, John (who I am working with on the same project) was
working on the original issue with George and forwarded the same solution 
along.  I
can imagine these tools to be evolved as Ant extension tasks at some point.

Original comment by nalbarra...@gmail.com on 15 Dec 2008 at 1:44

GoogleCodeExporter commented 8 years ago
George's class has been very useful, but it does have a limitation: invoking 
Jing in this way causes all the 
datatype declarations get flattened to string during the simplification 
process. I hope the permanent solution 
preserves the type declarations all the way through the Trang conversion.

Original comment by madden.jf@gmail.com on 2 Jan 2009 at 9:20

GoogleCodeExporter commented 8 years ago
The code I added to Jing (see issue 57) preserves datatypes correctly.

Original comment by jjc.jclark.com on 3 Jan 2009 at 7:56

GoogleCodeExporter commented 8 years ago
James, that's good news for me. Is the source stable enough to post latest 
version to the download area?

Original comment by madden.jf@gmail.com on 3 Jan 2009 at 9:52