Customization layer problem. Bug?
Posted: Mon Apr 08, 2013 6:55 pm
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