![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Schema Help >Thread Next - Re: Schema Help Re: Schema HelpTo: NULL Date: 1/3/2005 2:07:00 PM Yes, I have considered xs:choice, however, I don't see how I would apply that. In this case, I always want all of the elements in the order listed, but, I only want to allow content (specific content) in one of those elements. Thanks, David "Han" wrote: > Have you considered xs:choice instead of xs:sequence? > -- > Pohwan Han. Seoul. Have a nice day. > "David W. Rogers" <DavidWRogers@d...> wrote in message > news:423DF2B1-74BC-4F26-AFE2-99592532806A@m...... > >I am creating an evaluation form, to capture a question of the format: > > > > 1) I was able to hear everything the speaker said: > > > > Strongly Disagree Neutral Strongly Agree > > [ ] [ ] [ ] > > [ ] [ ] > > > > I am creating a schema to validate an XML document that has: > > > > <RankedQuery ID="1" Text="I was able to hear everything the speaker > > said:"> > > <StronglyDisagree></StronglyDisagree> > > <SortofDisagree></SortofDisagree> > > <Neutral>x</Neutral> > > <SortofAgree></SortofAgree> > > <StronglyAgree></StronglyAgree> > > </RankedQuery> > > > > > > I only want one of these to be able to have an 'x' in it at a time (like a > > radio button choice). My schema does not enforce that: > > > > <xs:element name="RankedQuery"> > > <xs:complexType> > > <xs:sequence> > > <xs:element ref="StronglyDisagree"/> > > <xs:element ref="SortofDisagree"/> > > <xs:element ref="Neutral"/> > > <xs:element ref="SortofAgree"/> > > <xs:element ref="StronglyAgree"/> > > </xs:sequence> > > <xs:attribute name="ID" use="required" type="xs:integer"/> > > <xs:attribute name="Text" use="required"/> > > </xs:complexType> > > </xs:element> > > > > <xs:element name="Neutral" type="xType"/> > > <xs:element name="SortofAgree" type="xType"/> > > <xs:element name="SortofDisagree" type="xType"/> > > <xs:element name="StronglyAgree" type="xType"/> > > <xs:element name="StronglyDisagree" type="xType"/> > > <xs:simpleType name="xType"> > > <xs:restriction base="xs:string"> > > <xs:enumeration value=""/> > > <xs:enumeration value="x"/> > > <xs:enumeration value="X"/> > > </xs:restriction> > > </xs:simpleType> > > > > > > Can someone redirect me in a direction that will enforce that one and only > > one of the xtype elements can have an 'x' in it? > > > > Thanks, > > David > > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
