Re: combining schemas

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Organization Dyomedea (http://dyomedea.com)
Message-ID <1069368413.21694.83.camel@delleric>
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
------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.