![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XSD Restriction [Thread Next] Re: XSD RestrictionTo: NULL Date: 8/2/2007 12:10:00 AM
ogh =FD forget to post error message here it is
"cos-all-limited.1.2: An 'all' model group must
appear in a particle with '{'min occurs'}' =3D '{'max occurs'}' =3D 1, and
that particle must be part of a pair which constitutes the '{'content
type'}' of a complex type definition."
On 2 A=F0ustos, 10:01, ibrahimo...@gmail.com wrote:
> Hello
>
> Thanks for your help but i tries xs:choise like below
>
> <xs:element name=3D"UpdateSubscriptionRequest">
> <xs:complexType>
> <xs:all>
> <xs:element name=3D"CampaignID"
> type=3D"xs:string" />
> <xs:choice>
> <xs:element name=3D"CCID" type=3D"XXX:CCI=
D" minOccurs=3D"0"
> maxOccurs=3D"1" />
> <xs:element name=3D"Email"
> type=3D"XXX:EmailType" minOccurs=3D"0" maxOccurs=3D"1" />
> </xs:choice>
>
> </xs:all>
> </xs:complexType>
> </xs:element>
>
> and it didnt worked then i tried like below
>
> <xs:element name=3D"UpdateSubscriptionRequest">
> <xs:complexType>
> <xs:choice>
> <xs:group ref=3D"RequestType1" />
> <xs:group ref=3D"RequestType2" />
> </xs:choice>
> </xs:complexType>
> </xs:element>
>
> <xs:group name=3D"RequestType1">
> <xs:all>
> <xs:element name=3D"CampaignID" type=3D"x=
s:string" />
> <xs:element name=3D"CCID" type=3D"kuzucom=
mon:CCID" minOccurs=3D"0"
> maxOccurs=3D"1" />
> </xs:all>
> </xs:group>
>
> <xs:group name=3D"RequestType2">
> <xs:all>
> <xs:element name=3D"CampaignID" type=3D"x=
s:string" />
> <xs:element name=3D"Email" type=3D"kuzuco=
mmon:EmailType" minOccurs=3D"0"
> maxOccurs=3D"1" />
> </xs:all>
> </xs:group>
>
> and it didnt worked but if i try like below it works but dont want
> to use xs:sequence
>
> <xs:element name=3D"UpdateSubscriptionRequest">
> <xs:complexType>
> <xs:choice>
> <xs:group ref=3D"RequestType1" />
> <xs:group ref=3D"RequestType2" />
> </xs:choice>
> </xs:complexType>
> </xs:element>
>
> <xs:group name=3D"RequestType1">
> <xs:sequence>
> <xs:element name=3D"CampaignID" type=3D"x=
s:string" />
> <xs:element name=3D"CCID" type=3D"kuzucom=
mon:CCID" minOccurs=3D"0"
> maxOccurs=3D"1" />
> </xs:sequence>
> </xs:group>
>
> <xs:group name=3D"RequestType2">
> <xs:sequence>
> <xs:element name=3D"CampaignID" type=3D"x=
s:string" />
> <xs:element name=3D"Email" type=3D"kuzuco=
mmon:EmailType" minOccurs=3D"0"
> maxOccurs=3D"1" />
> </xs:sequence>
> </xs:group>
>
> On 1 A ustos, 18:31, "Joe Fawcett" <joefawc...@newsgroup.nospam>
> wrote:
>
> > If you can have one or the other don't you need xs:choice?
>
> > --
>
> > Joe Fawcett (MVP - XML)
>
> >http://joe.fawcett.name
>
> > <ibrahimo...@gmail.com> wrote in message
>
> >news:1185978484.257637.232280@o......
> > Hello, im new to XML and XSD and i have some problems on
> > restrictions.
> > i want to use it for updateing subscription so i can update it with D
> > or with Emai
> > so i must have one of them but it doesnt matter which one. i tried
> > below but with that i may not have both email and id
>
> > is there any way to solve this problem?
>
> > <xs:element name=3D"UpdateSubscriptionRequest">
> > <xs:complexType>
> > <xs:all>
> > <xs:element name=3D"CCID" type=3D"XXX:CCID" minOccurs=3D"0"
> > maxOccurs=3D"1" />
> > <xs:element name=3D"Email" type=3D"XXX:EmailType" minOccurs=3D"0"
> > maxOccurs=3D"1" />
> > </xs:all>
> > </xs:complexType>
> > </xs:element>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
