- From: Chris Lilley <chris@w3.org>
- Date: Thu, 15 Dec 2005 23:12:51 +0100
- To: public-schemata-users@w3.org <public-schemata-users@w3.org>
- Message-ID: <1666390633.20051215231251@w3.org>
This is a forwarded message
From: ?? <mcha226@gmail.com>
To: "public-schemata-users@w3.org" <public-schemata-users@w3.org>
Date: Thursday, December 15, 2005, 10:48:59 PM
Subject: [Moderator Action] Question about GROUP and CHOICE combined
===8<==============Original message text===============
Apologies if this question is too easy or if I have not read the schema
documentation enough.
My schema is like this: There will be a choice between one of the two groups
a and b.
...
<xs:choice>
<xs:group ref="a"/>
<xs:group ref="b"/>
</xs:choice>
...
however if I have the following group declaration it will not pass. The
error message will say that "X" cannot appear in both groups.
...
<xs:group name="a">
<xs:sequence>
<xs:element ref="X"/>
<xs:element ref="Y"/>
</xs:sequence>
</xs:group>
<xs:group name="b">
<xs:sequence>
<xs:element ref="X"/>
<xs:element ref="Z"/>
</xs:sequence>
</xs:group>
...
...
The strange thing is that if I have the following combination it will
not work:
XY XY
XY XX
However the following will work:
XY YX
XX YX
XY YY
This means that it will only fail if the first element of both group is the
same. Anything else will pass. This seemed really strange
to a newbie like me. Is there anyway around it? By the way I am using the
validator from here:
http://tools.decisionsoft.com/schemaValidate.html
Cheers
Mark
===8<===========End of original message text===========
Non-member posting
--
Chris Lilley mailto:chris@w3.org
Chair, W3C SVG Working Group
W3C Graphics Activity Lead
Co-Chair, W3C Hypertext CG
Attachments
- TEXT/HTML attachment: Message.html
Received on Thursday, 15 December 2005 22:12:50 UTC