Re: combining schemas

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Organization Dyomedea (http://dyomedea.com)
Message-ID <1069845199.1097.408.camel@delleric>
On Wed, 2003-11-26 at 11:53, Bruce D'Arcus wrote:

> I'm now going through and cleaning up the mods schema.  Can someone 
> suggest how I might simplify the below?  This is the 
> auto-generated-from-the-XML-Schema stuff:
> 
> anyType =
>    mixed {
>      (attribute * { text }
>       | element1)*
>    },
>    empty
> 
> and:
> 
> element0 =
>    element * {
>      mixed {
>        (element0
>         | attribute * { text })*
>      }
>    }
> 
> element1 =
>    element * {
>      mixed {
>        (attribute * { text }
>         | element1)*
>      }
>    }
> 
> The patterns get used throughout like so:
> 
>      | element displayForm { anyType }
> 
> I wonder if I can just eliminate those patterns and replace them with 
> simply "text." 

No, not really. They are meant to allow any element and text node in the
extension element.

If you want that the RNG schema keeps that feature when it's used
standalone, you must keep such definitions.

Replacing them by text would mean that valid documents per the WXS
schema could be invalid per your RNG schema.

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.