[relaxng-user] combining schemas
Eric van der Vlist
vdv at dyomedea.com
Wed Nov 26 12:13:19 ICT 2003
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
------------------------------------------------------------------------
More information about the relaxng-user
mailing list