RE: Inconsistent Validation - mixed content and group

> -----Original Message-----
> From:	Eddie Robertsson [SMTP:erobertsson@allette.com.au]
> Sent:	Wednesday, May 29, 2002 4:56 PM
> To:	Eric van der Vlist
> Cc:	ijs@decisionsoft.com; xmlschema-dev@w3.org
> Subject:	Re: Inconsistent Validation - mixed content and group
> 
> Hi Eric,
> 
> > > <A>start<B>middle</B>end</A>
> > >
> > > If the data type for A is any numeric data type, a date, or some
> > > pattern, it will be very difficult to meaningfully apply.
> >
> > This is also what I meant :-) ... with Relax NG you can define what
> > "start", "middle" and "end" look like. And this is so simple that it's
> > surprising that other schema languages may stumble on this issue:
> > <element name="A">
> >  <data type="TypeOfStart"/>
> >  <element name="B">
> >    <data type="TypeOfMiddle"/>
> >  </element>
> >  <data type="TypeOfEnd"/>
> > </element>
> 
> Can you really do this with RELAX-NG? I'm just learning the powers of RNG
> so
> I'm not sure yet of all the features but in the tutorial at [1] it says:
> 
> "If the children of an element or an attribute match a data pattern, then
> complete content of the element or attribute must match that data pattern.
> It
> is not permitted to have a pattern which allows part of the content to
> match a
> data pattern, and another part to match another pattern. For example, the
> following pattern is not allowed:
> 
>       <element name="bad">
>         <data type="int"/>
>         <element name="note">
>           <text/>
>         </element>
>       </element>"
> 
> Doesn't this mean that you can't actually define datatypes for mixed
> content?
> 
I just posted basically the same reply.  

> However, since the <text/> pattern is allowed anywhere it does mean that
> you
> can decide where in the mixed content your character data should appear.
> 
Yup, that's a useful capability...I'm hoping we can get that into XML Schema
v1.1 (or at least in v2).

pvb

Received on Wednesday, 29 May 2002 21:35:29 UTC