W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2008

Re: Question on XSD elements in groups

From: Florent Georges <lists@fgeorges.org>
Date: Mon, 23 Jun 2008 11:30:24 +0200 (CEST)
To: Arshad Noor <arshad.noor@strongauth.com>, xmlschema-dev@w3.org
Message-ID: <89890.15819.qm@web23008.mail.ird.yahoo.com>

Arshad Noor wrote:


> Since I can only have a Symkey, SymkeyError or a combination
> of both in the to-be-defined element, why does NB think there
> will be ambiguity?

  Because when it will encounter a Symkey, it will be not possible to
know in the choice if this is the Symkey from the Symkey alternative,
or from the group alternative.

> How do I go about accomplishing what I want?

  The idiomatic solution is to use a choice on Symkey and optional
SymkeyError, or just a SymkeyError:

          <xs:element ref="Symkey"/>
          <xs:element ref="SymkeyError" minOccurs="0"/>
          <xs:element ref="SymkeyError"/>

  For more information, look for "UPA" or "UPA violation".



Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
Received on Monday, 23 June 2008 09:31:04 UTC

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