Multiple RelaxNG in a single framework
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 17
- Joined: Mon Nov 19, 2018 10:49 pm
Multiple RelaxNG in a single framework
We would like to have a single framework (CSS, Author Actions, etc.) but we would like also to support multiple RNG schemas. We believe this is possible but do not know how to implement this. We would appreciate any help in this matter.
Thanks
Thanks
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Multiple RelaxNG in a single framework
Hi,
It would help me to know more about your particular use case.
I see two possible situations here:
1) Some of your XML files need to be validated with a Relax NG Schema and some need to be validated with another.
1.1) If so, do the XML documents have references to the schema using the xml-model processing instruction?
Something like this:
If so, your framework configuration can come with an XML catalog which maps multiple schema references to the proper schema locations inside the framework.
1.2) If the XML documents are not using xml-model to refer to the schema, you could create a base framework configuration specifying the CSSs, actions and so on. That base framework would have no association rules. And then you could use the Preferences->"Document Type Associations" Extend button to extend the base framework twice, for each extension specifying specific association rules and a custom validation scenario which validates the XML with a specific RNG file.
2) All your XML files need to be validated sequentially with two Relax NG Schemas. So an XML would be considered valid only when validated with both RNG schemas.
In your framework you can create a custom validation scenario with two stages, each stage validates the same XML document with a different Relax NG Schema.
Regards,
Radu
It would help me to know more about your particular use case.
I see two possible situations here:
1) Some of your XML files need to be validated with a Relax NG Schema and some need to be validated with another.
1.1) If so, do the XML documents have references to the schema using the xml-model processing instruction?
Something like this:
Code: Select all
<?xml-model href="path/to/schema.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<root>
...
</root>
1.2) If the XML documents are not using xml-model to refer to the schema, you could create a base framework configuration specifying the CSSs, actions and so on. That base framework would have no association rules. And then you could use the Preferences->"Document Type Associations" Extend button to extend the base framework twice, for each extension specifying specific association rules and a custom validation scenario which validates the XML with a specific RNG file.
2) All your XML files need to be validated sequentially with two Relax NG Schemas. So an XML would be considered valid only when validated with both RNG schemas.
In your framework you can create a custom validation scenario with two stages, each stage validates the same XML document with a different Relax NG Schema.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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