W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

Alternative versions of an element within one schema

From: Paul B. Anderson <paul@pnlassociates.com>
Date: Wed, 6 Mar 2002 18:08:11 -0500 (EST)
Message-ID: <3C868FEB.118BEB52@pnlassociates.com>
To: xmlschema-dev@w3.org
Hi:

I'm trying to find a way to handle multiple versions of an element
definition within a single schema.  I keep running into UPA problems
(among others) so I was wondering if anyone has solved this problem.

I want to allow a single schema to validate instance documents like

<root>
  <a version="1.0">
    ... some complex content
  </a>
</root>

or

<root>
  <a version="2.0">
    ... complex content but different from version 1.0 in some way
  </a>
</root>

I have tried defining two groups, a10 and a20, that each have a fixed
value of attribute version.  These are then listed in the schema under
<root> within a choice element.

How can I make this work?  It seems as if it is an important situation.

Thanks,

Paul
Received on Thursday, 7 March 2002 04:08:42 GMT

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