[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
RE: Is it possible (simpleType or complexType)?

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

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.