XInclude and Relax NG: How to use?
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 3
- Joined: Wed Sep 22, 2010 12:27 pm
XInclude and Relax NG: How to use?
Hello,
i'm new to xml and especially rng. Now i have the following problem:
My xml file contains a construction like:
So how do i solve this with rng? The first testgroup is no problem. But what do i have to do with the include? rng can't read it/the referencing file.
Do i have to write something like this???:
I really don't have a plan to work with that...
Greetz
m0ps
i'm new to xml and especially rng. Now i have the following problem:
My xml file contains a construction like:
Code: Select all
<testgroup>
<test name="t1">
...
<test name="t2">
...
</testgroup>
<testgroup>
<xi:include href="other.xml" parse="xml"/> <!-- xml contains another <test name="t3"> and <test name="t4"> -->
</testgroup>
Do i have to write something like this???:
Code: Select all
<rng:define name="testgroup">
<rng:zeroOrMore>
<rng:choice>
<rng:element name="test">
...
</rng:element>
<rng:include/>
</rng:choice>
</rng:zeroOrMore>
</rng:define>
Greetz
m0ps
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: XInclude and Relax NG: How to use?
There are two possibilities, depending on the XInclude processing.
If XInclude processing is enabled then the parser will replace the XInclude elements with the actual included content before the Relax NG validation so your Relax NG schema does not need to declare the XInclude elements.
If XInclude processing is disabled then your Relax NG schema needs to specify the XInclude elements that you use. They are defined as any other element from your schema. See DocBook 5 schemas for an example.
For enabling/disabling XInclude processing in oXygen you can use Options->Preferences -- XML -- XML Parser -- Enable XInclude processing. By default the XInclude processing is enabled.
Best Regards,
George
If XInclude processing is enabled then the parser will replace the XInclude elements with the actual included content before the Relax NG validation so your Relax NG schema does not need to declare the XInclude elements.
If XInclude processing is disabled then your Relax NG schema needs to specify the XInclude elements that you use. They are defined as any other element from your schema. See DocBook 5 schemas for an example.
For enabling/disabling XInclude processing in oXygen you can use Options->Preferences -- XML -- XML Parser -- Enable XInclude processing. By default the XInclude processing is enabled.
Best Regards,
George
George Cristian Bina
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