Customization layer problem. Bug?
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Customization layer problem. Bug?
Hy,
i would like to extend DocBook with elements from another namespace. I have created a RELAX NC grammar like this:
Then i have created a very simple book for demo purpose:
This is fine, unless i assign the schema from above via
If i do, the <chapter> elemt becomes invalid. JING says:
Program version is Oxygen 14.2.
Is this a bug, or did i get something wrong?
Sincerely,
Frank
i would like to extend DocBook with elements from another namespace. I have created a RELAX NC grammar like this:
Code: Select all
namespace cl = "http://osci.bremen.de/publish/codelist"
namespace db = "http://docbook.org/ns/docbook"
include "http://docbook.org/xml/5.0/rng/docbookxi.rnc" {
db.components |= cl.codeliste
}
cl.codeliste =
element cl:codeliste {
attribute title { text }
}
Code: Select all
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:cl="http://osci.bremen.de/publish/codelist"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Test</title>
<chapter>
<title>Test</title>
<simpara>Chapter should be valid</simpara>
</chapter>
</book>
Code: Select all
<?xml-model href="standardcodelisten-v2.rnc" type="application/relax-ng-compact-syntax"?>
Code: Select all
System-ID: E:\cygwin\home\osci\oscisoftware\docbook 5\framework\codelist\source\demo.xml
Haupt-Validierungsdatei: E:\cygwin\home\osci\oscisoftware\docbook 5\framework\codelist\source\demo.xml
Schema: E:\cygwin\home\osci\oscisoftware\docbook 5\framework\codelist\source\standardcodelisten-v2.rnc
Programmname: Jing
Fehlerlevel: error
Beschreibung: element "chapter" not allowed anywhere; expected the element end-tag or element "bibliography", "cl:codeliste", "glossary", "index", "info", "part", "reference", "subtitle", "titleabbrev", "toc" or "xi:include"
Anfang: 6:6
Ende: 6:13
Is this a bug, or did i get something wrong?
Sincerely,
Frank
-
- Posts: 1
- Joined: Tue Apr 09, 2013 12:31 pm
Re: Customization layer problem. Bug?
Post by ohofrichter »
Hi,
it's not an bug.
The problem is the redefinition of db.components instead of combination:
In the previous code the grammar docbookxi.rnc is is included and as part of this inclusion the element db.components is redefined.
You have to do it the following way to merge the definitions:
it's not an bug.
The problem is the redefinition of db.components instead of combination:
Code: Select all
include "http://docbook.org/xml/5.0/rng/docbookxi.rnc" {
db.components |= cl.codeliste
}
You have to do it the following way to merge the definitions:
Code: Select all
include "http://docbook.org/xml/5.0/rng/docbookxi.rnc"
db.components |= cl.codeliste
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