W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

element with multiple definitions

From: Daniel Patel <danielp@ii.uib.no>
Date: Wed, 23 Jul 2003 15:57:55 +0200 (MEST)
To: xmlschema-dev@w3.org
Message-ID: <Pine.GSO.4.56.0307231556570.26301@apal.ii.uib.no>



  2 questions :
    1.
  Is it possible to specify that for an element, either all or none of
 its attributes must be specified.
  Specifying only some of them is not allowed.

 2.
  How can i specify in an xml schema so
  an element with name 'arg' either consists of an attribute att
  and contains a simple element name,
  ex:

  <arg att="aaa">
    <name>daniel<name>
  </arg>

  or
  consists of an attribute differentAtt and a simple element
  age:

  <arg differentAtt="bbb">
    <age>26</age>
  </arg>
  .

  I don't want having an arg element with both attributes or both
  name and age element to be legal.


 Daniel
Received on Friday, 25 July 2003 08:51:49 GMT

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