W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2010

How to make simple type choice

From: Karl Stubsjoen <kstubs@gmail.com>
Date: Fri, 27 Aug 2010 14:11:25 -0700
Message-ID: <AANLkTin7oCJjBgx0WA7Z8EEto+0N+DrogcpgJ=tA5mbn@mail.gmail.com>
To: xmlschema-dev@w3.org
I need to make a choice between various simple types for an attribute.
 The xml may look something like this:

<project>
<queries name="test1">
  <query name="somename1"></query>
  <query name="samename2"></query>
</queries>
<queries name="test2">
  <query name="somename2"></query>
  <query name="samename3"></query>
</queries>
</project>

So basically a queries node named "test1" will have a query node with
an enumeration restriction of:
somename1
somename2

And, a queries node named 'test2" will have a query node with an
enumeration restriction of:
somename2
somename3

How do you achieve this?  I'm looking at xs:assert but not sure I'm on
the right path.
Thanks,
Karl..
Received on Friday, 27 August 2010 21:12:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:57 UTC