Re: Constraining a mixed type ?

----- Original Message ----- 
From: "Michael Kay" <mhk@mhk.me.uk>
To: <noah_mendelsohn@us.ibm.com>
Cc: "'Pierre Attar'" <attar@tireme.fr>; "'Bruno Chatel'" <bcha@chadocs.net>; <xmlschema-dev@w3.org>
Sent: Sunday, April 18, 2004 11:21 PM
Subject: RE: Constraining a mixed type ?


> > 
> > > > I wonder if it is possible to define a constrain on a mixed 
> > > > content using XML Schemas. 
> > > 
> > > I don't think this is possible.
> > > 
> > > Michael Kay
> > 
> > Actually, a number of interesting constraints are possible.  
> 
> My interpretation of the original question (I might have interpreted it
> wrongly) was that the poster wanted to constrain the content of the text
> node children of the mixed content node, and it's this that I don't think is
> possible.
> 
> (I have a similar requirement myself: an element in which child text nodes
> are allowed before the first element child but not following it).


Exact. My need is to apply constrainst (such as non empty) on the content
of the mixed content model.

For instance a way to declare that :

<p/>
and
<p><emph/></p>

are not allowed by declaring P using a mixed content model including
a repeteable choice of emph elements (containing only strings).

-- bruno --

> Michael Kay
> 
> 
> 

Received on Monday, 19 April 2004 07:56:59 UTC