Thomas Schraitle wrote:
Hi Dave,

I tried your Simple DocBook Schema but I got errors in oXygen 8.2. I transformed your RNC into RNG with trang.
I think, the element itemizedlist is missing the namespace from DocBook 5.

jing -c dbtiny.rnc example.xml works fine. No need to convert to rng format for validation.

The strange thing is, I validated the RNG version with jing and msv and they didn't complain, only oXygen refused to work with this file. Maybe someone else can explain these differences.

When I insert the above changes I get the following RNC schema:

--------------
default namespace = "http://docbook.org/ns/docbook";
namespace inherit = inherit

#
db.itemizedlist |=
  element itemizedlist {
    db.itemizedlist.attlist, db.itemizedlist.info, db.listitem+
  }
include "docbook.rnc" inherit = inherit {
snip
  db.itemizedlist = notAllowed
}

I was wrong.
Because you are overriding db.itemizedlist,
the new definition needs to be inside the include.

default namespace db = "http://docbook.org/ns/docbook";
include "/sgml/docbook/v5/rng/docbook.rnc" {
   start = db.article

db.itemizedlist |=
    element itemizedlist {
       db.itemizedlist.attlist,
       db.itemizedlist.info,
       db.listitem+
     }


etc.

Without the ns definition at the top I get
/sgml/docbook/v5/rng/docbook.rnc:81:5: error: conflicting ID-types for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace"; of element "itemizedlist"

which matches your error.

I'm not getting a valid file with

<article xmlns="http://docbook.org/ns/docbook";>

  <info>
    <title>Art title</title>
  </info>

  <section>
  <title>Art intro</title>



<itemizedlist>
  <listitem>
   <para>list content</para>
 </listitem>
</itemizedlist>

  </section>
</article>


That validates in Oxygen 8.2 as well.




regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to