Combine Multiple RelaxNG Schemas
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 26
- Joined: Tue Mar 31, 2009 5:47 pm
Combine Multiple RelaxNG Schemas
Hi guys,
I have a large selection of RelaxNG schemas files. There is one root most file which is called "selector.rng", and this includes the various other RelaxNG modules.
Is there a utility that will combine all of these schemas into a single file?
Many thanks!
Lea Hayes
I have a large selection of RelaxNG schemas files. There is one root most file which is called "selector.rng", and this includes the various other RelaxNG modules.
Is there a utility that will combine all of these schemas into a single file?
Many thanks!
Lea Hayes
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Combine Multiple RelaxNG Schemas
Hello,
The latest version of Jing can get you a serialization of the simplified parsed schema. To get the latest Jing you can either
checkout the project from
http://code.google.com/p/jing-trang/source/checkout
and run ant
or
you can get a compiled jar that I posted here
http://code.google.com/p/jing-trang/iss ... l?id=79#c6
Then you can invoke it with something like
java -jar jing.jar -s selector.rng
Best Regards,
George
The latest version of Jing can get you a serialization of the simplified parsed schema. To get the latest Jing you can either
checkout the project from
http://code.google.com/p/jing-trang/source/checkout
and run ant
or
you can get a compiled jar that I posted here
http://code.google.com/p/jing-trang/iss ... l?id=79#c6
Then you can invoke it with something like
java -jar jing.jar -s selector.rng
Best Regards,
George
George Cristian Bina
-
- Posts: 26
- Joined: Tue Mar 31, 2009 5:47 pm
Re: Combine Multiple RelaxNG Schemas
Thanks George, that is fantastic!
I have a couple of Schematron bits that get lost, but this isn't too much of a problem because I can just drop those back in manually.
Thanks again!
Lea Hayes
I have a couple of Schematron bits that get lost, but this isn't too much of a problem because I can just drop those back in manually.
Thanks again!
Lea Hayes
-
- Posts: 26
- Joined: Tue Mar 31, 2009 5:47 pm
Re: Combine Multiple RelaxNG Schemas
Hi George,
I have another question regarding Jing and Trang.
I created the following Windows batch file using your advise, and this has been working great. In a Java project I have added the "jing.jar" and "trang.jar" into the build path. Do you know how I can replicate the following functionality in Java?
java -jar jing.jar -s rng\selector.rng > extensions.standalone.rng
java -jar trang.jar extensions.standalone.rng extensions.rnc
Essentially I would like to add two buttons to my program. One which combines RelaxNG schema into a single file, and another which does the same but also converts to RelaxNG Compact.
Many thanks,
Lea Hayes
I have another question regarding Jing and Trang.
I created the following Windows batch file using your advise, and this has been working great. In a Java project I have added the "jing.jar" and "trang.jar" into the build path. Do you know how I can replicate the following functionality in Java?
java -jar jing.jar -s rng\selector.rng > extensions.standalone.rng
java -jar trang.jar extensions.standalone.rng extensions.rnc
Essentially I would like to add two buttons to my program. One which combines RelaxNG schema into a single file, and another which does the same but also converts to RelaxNG Compact.
Many thanks,
Lea Hayes
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Combine Multiple RelaxNG Schemas
When you run from command line specifying a jar you actually invoke the main method of the class specified as main class in the jar manifest file. For Jing the main class us com.thaiopensource.relaxng.util.Driver while for Trang it is com.thaiopensource.relaxng.translate.Driver.
You can either invoke these methods or you can look how they are implemented and extract code from them create your class.
Best Regards,
George
You can either invoke these methods or you can look how they are implemented and extract code from them create your class.
Best Regards,
George
George Cristian Bina
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service