W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2004

Re: Constraining a mixed type ?

From: Bruno Chatel <bcha@chadocs.net>
Date: Mon, 19 Apr 2004 14:02:59 +0200
Message-ID: <00ad01c42606$459a5ce0$0600a8c0@chadocshome.com>
To: "Michael Kay" <mhk@mhk.me.uk>, <noah_mendelsohn@us.ibm.com>
Cc: "'Pierre Attar'" <attar@tireme.fr>, <xmlschema-dev@w3.org>, "Bruno Chatel" <bcha@chadocs.net>


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

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:11 UTC