Re: combining schemas

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Organization Dyomedea (http://dyomedea.com)
Message-ID <1069777739.1108.169.camel@delleric>
On Tue, 2003-11-25 at 16:49, Bruce D'Arcus wrote:
> Sorry to post this again, but I really need an answer to this question, 
> and the documentation I've found isn't helping me (more a function of 
> my limitations than that of the documentation I'm sure!).  Anyone?

Yep. Sorry for the delay, but I am really overloaded...
> 
> On Nov 20, 2003, at 5:46 PM, Eric van der Vlist wrote:
> 
> >> 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.
> 
> Thanks for this Eric.  I was able to get it working ultimately.
> 
> I'm now stuck with the same duplicate start problem in another 
> circumstance.
> 
> The mods schema has an extension element that allows one to embed 
> content from other namespaced schema.  I have create simple schema 
> called bibio-notes, which I want to use to add marked up annotations to 
> the record.
> 
> I assumed the following would work, but I am getting the duplicate 
> start error from nxml mode.  The start pattern for mods is:
> 
> start = ModsSchema.
> 
> Here's my schema:
> 
> ===============================
> 
> include "biblio-notes.rnc" { start = ModsSchema }
> 
> include "mods.rnc" {
>     extension = element extension { biblio-notes }*
> }

You have now a conflict between the start element redefined in your
first include and a start element defined in your second include.

How to solve this depends on your actual schemas and on what you're
trying to achieve.

I have tried to explain the different mechanisms in my book:

http://books.xmlschemata.org/relaxng/RngBookBuildingBlocks.html

but can't give any advise without have a better idea of what's in your
schemas.

Eric

-- 
Did you know it? Python has now a Relax NG (partial) implementation.
                                          http://advogato.org/proj/xvif/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
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.