Constraining attr value in DocBook rng schema customization
This should cover W3C XML Schema, Relax NG and DTD related problems.
Constraining attr value in DocBook rng schema customization
Hi there,
I'm trying to create a customization layer for the DocBook 5.0 rng schema in which I constrain the legal values for the security attribute to an enumerated set of values. From tutorials I've read it seems I'm supposed to redefine db.security.attribute as follows:
However, if I add the code above to my customization, Oxygen/Jing complains that <define> for db.security.attribute must have a combine attribute (with a value of interleave or choice). Adding combine="interleave" also gives an error. There's no error if I add combine="choice" but it also doesn't constrain the security attribute and considers the doc valid with any value for security.
How do I completely override a definition from the base schema in my customization layer?
Thanks,
David
I'm trying to create a customization layer for the DocBook 5.0 rng schema in which I constrain the legal values for the security attribute to an enumerated set of values. From tutorials I've read it seems I'm supposed to redefine db.security.attribute as follows:
Code: Select all
<define name="db.security.attribute">
<attribute name="security">
<a:documentation>Security level of this element.</a:documentation>
<choice>
<value>internal</value>
<a:documentation>This element contains internal-only content.</a:documentation>
<value>reviewer</value>
<a:documentation>This element contains reviewer-content.</a:documentation>
<value>external</value>
<a:documentation>This element contains external content and will be published in all version of the docuemnt.</a:documentation>
<value>writeronly</value>
<a:documentation>This element contains writeronly content and will not be published in external, internal, or reviewer versions of the document.</a:documentation>
</choice>
</attribute>
</define>
How do I completely override a definition from the base schema in my customization layer?
Thanks,
David
Re: Constraining attr value in DocBook rng schema customization
Never mind. I figured out that overrides have to be children of the <include> of the schema you're including and overriding. That makes perfect sense now that I get it...much better than the DTD way.
Sorry for the noise,
David
Sorry for the noise,
David
Re: Constraining attr value in DocBook rng schema customization
Hi David,
No problem, thanks for the follow up. This will be a useful topic for people searching our forum for a similar issue.
Best Regards,
George
No problem, thanks for the follow up. This will be a useful topic for people searching our forum for a similar issue.
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