[relaxng-user] combining schemas

Eric van der Vlist vdv at dyomedea.com
Thu Nov 20 23:46:53 ICT 2003


Hi,

On Thu, 2003-11-20 at 23:27, Bruce D'Arcus wrote:

> 
> Here's what I have at the moment:
> ===============================
> start = document
> include "docbook.rnc"
> include "mods3.rnc"
> document = element document { meta, content }
> meta = ModsSchema
> content = { "article" | "book" | "chapter" }
> ===============================
> 
> What am I doing wrong??

If you include the schema for docbook, you need to either redefine the
start pattern defined in the schema for docbook or combine its content
with a new one. Since here you want to replace its definition, the only
option left is to redefine it:


include "docbook.rnc" {
  start = document
}
include "mods3.rnc"
document = element document { meta, content }
meta = ModsSchema
content = { "article" | "book" | "chapter" }

BTW, this last pattern means that content is a value equal to "article",
"book" or "chapter". This is illegal to include that after "meta" if
it's an element and, in any case, probably not what you mean. What
about:

content = { article | book | chapter }

???

Hope that helps.

Eric
-- 
Read me on Advogato.
                                         http://advogato.org/person/vdv/
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)                    http://masl.to/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)                          http://masl.to/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



More information about the relaxng-user mailing list