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

RE: defining rules for a or b or ab

From: Lemmin, Harald <Harald.Lemmin@softwareag.com>
Date: Tue, 5 Aug 2003 11:55:46 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210606E34CCC@daemsg02.software-ag.de>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Forget about the second minOccurs:
    <xs:element ref = "a"></xs:element> 
    <xs:element ref = "b" minOccurs = "0"></xs:element> 
  <xs:element ref = "b"></xs:element> 

-----Original Message-----
From: Lemmin, Harald [mailto:Harald.Lemmin@softwareag.com]
Sent: Dienstag, 5. August 2003 11:51
To: 'xmlschema-dev@w3.org'
Subject: RE: defining rules for a or b or ab

How about this? 

    <xs:element ref = "a"></xs:element> 
    <xs:element ref = "b" minOccurs = "0"></xs:element> 
  <xs:element ref = "b" minOccurs = "0"></xs:element> 

-----Original Message----- 
From: Ravi Ravi [ mailto:ravi_21a3@yahoo.com <mailto:ravi_21a3@yahoo.com> ] 
Sent: Dienstag, 5. August 2003 11:41 
To: xmlschema-dev@w3.org 
Subject: defining rules for a or b or ab 

I'm trying to specify the rules a|b|ab in XMLSchema. 

SCQ give an "Ambiguous content model" error stating 
that the particles 'foo' from fooType and foobarType 

  <element name = "foo" type = "fooType"/> 
  <element name = "bar" type = "barType"/> 
  <group ref = "foobarType"/> 

<group name="foobarType"> 
    <element name = "foo" type= "fooType"/> 
    <element name = "bar" type= "barType"/> 

Any suggestions? 

(For some reason my first post didn't go through. 

Do you Yahoo!? 
Yahoo! SiteBuilder - Free, easy-to-use web site design software 
http://sitebuilder.yahoo.com <http://sitebuilder.yahoo.com>  
Received on Tuesday, 5 August 2003 05:55:50 UTC

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