List Info

Thread: DocBook/Relax question




DocBook/Relax question
user name
2007-07-12 06:04:59
First things first. This may be offtopic but I'm not
sure...

A few days ago Dave Pawson posted his simplification of
DocBook 5.
I've been playing with it.
Now, I'm pretty damn new to RELAX NG - I'm moving my skills
over from
DTDs because my current employer wants to use DocBook 5.

I'm trying to work out if there is a way I re-enable
elements in
DocBook itself. I have Mr Pawson's schema in dp.rnc and I'm
doing
something like this:


include "dp.rnc" { "dp.rnc" {

start |= db.book | db.part | db .chapter
}

That works just fine.
However, if I do something like:


include "dp.rnc" {
start |= db.book | db.part | db .chapter
element bibliography {
db.bibliography.attlist,
db.bibliography.attlist,
db.bibliography.info,
db.all.blocks*,
(db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
db.all.blocks*,
(db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
(db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
}
}

That is, I try to re-enable bibliographies, I get an error I
don't
really understand:


conflicting ID-types for attribute "id" from
namespace
"http://www
.w3.org/XML/1998/namespace" of element
"bibliography"

(the error coming from Oxygen, btw).

I'm obviously doing something wrong but for the life of me I
can't see what.

Am I just trying to go about this the wrong way or even
doing
something dumb in the first place?

cheers


-- 
Nic Gibson
Director, Corbas Consulting Ltd
Editorial and Technical Consultancy
http://www.corbas.co.uk/


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


Re: DocBook/Relax question
user name
2007-07-12 06:36:26
Nic Gibson wrote:

> I'm trying to work out if there is a way I re-enable
elements in
> DocBook itself. 

Starting point is *full* docbook, so I'm not sure why
you need to re-enable them?




> However, if I do something like:
> 
> 
> include "dp.rnc" {
> start |= db.book | db.part | db .chapter
> element bibliography {
> db.bibliography.attlist,
> db.bibliography.attlist,
> db.bibliography.info,
> db.all.blocks*,
> (db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
> db.all.blocks*,
> (db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
> (db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
> }
> }


the 'include' goes from {
through to
}

so your definition is within that?
My 'redefinition' example was outside that {}

try that.


http://books.xmlschemata.org/relaxng/ch17-77120.html
gives info.






regards

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


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


Re: DocBook/Relax question
user name
2007-07-12 07:57:30
Nic Gibson wrote:

> db.bibliography.attlist,
> db.bibliography.attlist,
...
> That is, I try to re-enable bibliographies, I get an
error I don't
> really understand:
> 
> 
> conflicting ID-types for attribute "id" from
namespace
> "http://www
.w3.org/XML/1998/namespace" of element
"bibliography"
> 
> (the error coming from Oxygen, btw).

Probably you are defining some attribute twice, and at least
once with
xsd:ID type. Note that you are referencing
db.bibliography.attlist twice.

In some more complex customization this error message could
be caused by
not excluding some namespace from db.any patten, but this is
not your
case probably.

Jirka

-- 
------------------------------------------------------------
------
  Jirka Kosek      e-mail: jirkakosek.cz      http://xmlguru.cz
------------------------------------------------------------
------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34
member
------------------------------------------------------------
------
Be in, register for XML Prague 2007 today! http://www.xmlprague.cz

Re: DocBook/Relax question
user name
2007-07-13 01:30:03
Hi,

On Donnerstag, 12. Juli 2007, Jirka Kosek wrote:
> Nic Gibson wrote:
> > db.bibliography.attlist,
> > db.bibliography.attlist,
>
> ...
>
> > That is, I try to re-enable bibliographies, I get
an error I don't
> > really understand:
> >
> >
> > conflicting ID-types for attribute "id"
from namespace
> > "http://www
.w3.org/XML/1998/namespace" of element
"bibliography"
> >
> > (the error coming from Oxygen, btw).
>
> Probably you are defining some attribute twice, and at
least once with
> xsd:ID type. Note that you are referencing
db.bibliography.attlist
> twice.

I suppose it has nothing to do with datatypes. It seems it
is the same 
issue with Dave's Simple DocBook Schema (see my answer
there.) The 
namespace from DocBook 5 is missing. 

There are some syntax errors and other issues with Nic's
schema. I tried 
to fix them and it seems to work now (at least with my
oXygen version):

--------------
default namespace = "http://docbook.or
g/ns/docbook"
namespace inherit = inherit

include "dp.rnc" inherit = inherit {
  start |= db.book | db.part | db.chapter
  db.bibliography = element bibliography {
      db.bibliography.attlist,
      db.bibliography.info,
      db.all.blocks*,
      (db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+),
      db.all.blocks*,
      (db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+),
      (db.bibliodiv+ | (db.biblioentry | db.bibliomixed)+)
    }
}
--------------


Bye,
Tom

-- 
Thomas Schraitle

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )