W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

RE: Inconsistent Validation - mixed content and group

From: Biron,Paul V <Paul.V.Biron@kp.org>
Date: Wed, 29 May 2002 16:59:07 -0700
Message-Id: <8904C60CACA7D51191BC00805FEAAF4358ECEA@crdc-exch-7.crdc.kp.org>
To: "'Eddie Robertsson'" <erobertsson@allette.com.au>, Eric van der Vlist <vdv@dyomedea.com>
Cc: ijs@decisionsoft.com, xmlschema-dev@w3.org

> -----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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC