Customization layer problem. Bug?

Posts: 58
Joined: Tue Jan 01, 2013 3:19 pm

Customization layer problem. Bug?

Post by fsteimke » Mon Apr 08, 2013 6:55 pm


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 = ""
namespace db = ""

include "" {
db.components |= cl.codeliste
cl.codeliste =
element cl:codeliste {
attribute title { text }
Then i have created a very simple book for demo purpose:

Code: Select all

 <book xmlns="" xmlns:xi=""    xmlns:cl=""
xmlns:xlink="" version="5.0">
<simpara>Chapter should be valid</simpara>
This is fine, unless i assign the schema from above via

Code: Select all

 <?xml-model href="standardcodelisten-v2.rnc" type="application/relax-ng-compact-syntax"?>
If i do, the <chapter> elemt becomes invalid. JING says:

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
Program version is Oxygen 14.2.

Is this a bug, or did i get something wrong?


Posts: 1
Joined: Tue Apr 09, 2013 12:31 pm

Re: Customization layer problem. Bug?

Post by ohofrichter » Tue Apr 09, 2013 12:40 pm


it's not an bug.

The problem is the redefinition of db.components instead of combination:

Code: Select all

include "" {
db.components |= cl.codeliste
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:

Code: Select all

include ""

db.components |= cl.codeliste

Post Reply