W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2005

RE: Is it possible (simpleType or complexType)?

From: Michael Kay <mike@saxonica.com>
Date: Mon, 21 Feb 2005 12:45:09 -0000
To: <prze_moc@poczta.onet.pl>, <xmlschema-dev@w3.org>
Message-Id: <E1D3CwA-0001SY-00@ukmail1.eechost.net>

> 
> Is it possible to define a schema for this?

You can define a schema that permits both these options, but not a schema
that permits *only* these two options.
> 
> I have element <arg>. I want that <arg> has simpletype 
> (xs:integer) or only one child <var> and any other elements or text.
> I don't want to create a new element e.g <number> for simpletype
> 
> <arg>
> 12345
> </arg>
> 
> or
> 
> <arg>
>     <var/>
> </arg/>
> 

Why use the same element name to mean two different things? Define a choice
between <int-arg> and <var-arg> with different content models.

Michael Kay
http://www.saxonica.com/
Received on Monday, 21 February 2005 12:50:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:49 GMT