OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: combine


Norman Walsh wrote:

> / James Clark <jjc@jclark.com> was heard to say:
> | Right.  We could have a restriction on combine="group" that you can't use it
> | in a way which makes order significant (eg combining two <element>
> | patterns).  On the other hand that would rule out using combine="group" to
> | provide functionality similar to derivation of complex types by extension in
> | XML Schema (adding things on to the end of a content model).
> 
> Making order insignificant would be nice, but I think it would be a
> mistake to lose the ability to mutate content models this way.

We do not need "combine" for mimicking "derivation by extension".
Here is a rewrite of an example of "derivation by extension" in 
XML Schema Part 0.  

<grammar>

<start>
<element name="dmy">
<element name="uk">
  <ref name="UKAddress"/>
</element>
<element name="us">
  <ref name="USAddress"/>
</element>
</element>
</start>

<define name="Address">
   <element name="name"><anyString/></element>
   <element name="street"><anyString/></element>
   <element name="city"><anyString/></element>
</define>

 <define name="USAddress">
  <ref name="Address"/>
  <element name="state"><anyString/></element>
  <element name="zip"><anyString/></element>
 </define>

 <define name="UKAddress">
  <ref name="Address"/>
  <element name="postcode"><anyString/></element>
  <attribute name="exportCode"><anyString/></attribute>
 </define>

</grammar>

Cheers,

Makoto


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC