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

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>
Re: Question on XSD elements in groups

Arshad Noor wrote:

  Hi,

> 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:choice>
       <xs:sequence>
          <xs:element ref="Symkey"/>
          <xs:element ref="SymkeyError" minOccurs="0"/>
       </xs:sequence>
       <xs:sequence>
          <xs:element ref="SymkeyError"/>
       </xs:sequence>
    </xs:choice>

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

  Regards,

--drkm
























      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
Received on Monday, 23 June 2008 09:31:04 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.