The PrimativeValue xs:choice appears to cause all elements making up the
items of the complexType to be available for edit and saved as part of the
My.blah model Editor file.
I would have thought only one of them would be valid as part of the file.
Or at least flagged as invalid on next close/open.
My anyType reference allows that same behaviour (editing in a
PrimativeValue of all of these elements not just one). All of the elements
within the s:choice come up in the Properties window for edit.
Yes, a choice is modeled as a set of optional features and there is as yet no
enforcement of the mutual exclusiveness of the choices. In fact, we don't
even record the information about the exclusiveness yet. This bugzilla tracks
the issue:
> Ed-
>
> The PrimativeValue xs:choice appears to cause all elements making up the
> items of the complexType to be available for edit and saved as part of the
> My.blah model Editor file.
>
> I would have thought only one of them would be valid as part of the file.
> Or at least flagged as invalid on next close/open.
>
> My anyType reference allows that same behaviour (editing in a
> PrimativeValue of all of these elements not just one). All of the elements
> within the s:choice come up in the Properties window for edit.
>
> <s:complexType name="PrimativeValue">
> <s:choice>
> <s:element name="Float" type="s:float">
> </s:element>
> <s:element name="Boolean" type="s:boolean">
> </s:element>
> <s:element name="Decimal" type="s:decimal">
> </s:element>
> <s:element name="Double" type="s:double">
> </s:element>
> <s:element name="HexBinary" type="s:hexBinary">
> </s:element>
> <s:element name="Duration" type="s:duration">
> </s:element>
> <s:element name="DateTime" type="s:dateTime">
> </s:element>
> <s:element name="Date" type="s:date">
> </s:element>
> <s:element name="AnyURI" type="s:anyURI">
> </s:element>
> <s:element name="String" type="s:string">
> </s:element>
> <s:element name="Notation" type="s:NOTATION">
> </s:element>
> <s:element name="Qname" type="s:QName">
> </s:element>
> </s:choice>
> </s:complexType>
> <s:complexType name="MyPrimativeType">
> <s:sequence>
> <s:element minOccurs="0" maxOccurs="1" name="myOPCPrimativeValue"
> type="s0:PrimativeValue" />
> </s:sequence>
> </s:complexType>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Jim,
<p>Yes, a choice is modeled as a set of optional features and there is
as yet no enforcement of the mutual exclusiveness of the choices.
In fact, we don't even record the information about the exclusiveness yet.
This bugzilla tracks the issue:
<blockquote> <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=51210">https://bugs.eclipse.org/bugs/show_bug.cgi?id=51210</a></blockquote>
<p><br>jim wrote:
<blockquote TYPE=CITE>Ed-
<p>The PrimativeValue xs:choice appears to cause all elements making up
the
<br>items of the complexType to be available for edit and saved as part
of the
<br>My.blah model Editor file.
<p>I would have thought only one of them would be valid as part of the
file.
<br>Or at least flagged as invalid on next close/open.
<p>My anyType reference allows that same behaviour (editing in a
<br>PrimativeValue of all of these elements not just one). All of the elements
<br>within the s:choice come up in the Properties window for edit.
<p> <s:complexType name="PrimativeValue">
<br>
<s:choice>
<br>
<s:element name="Float" type="s:float">
<br>
</s:element>
<br>
<s:element name="Boolean" type="s:boolean">
<br>
</s:element>
<br>
<s:element name="Decimal" type="s:decimal">
<br>
</s:element>
<br>
<s:element name="Double" type="s:double">
<br>
</s:element>
<br>
<s:element name="HexBinary" type="s:hexBinary">
<br>
</s:element>
<br>
<s:element name="Duration" type="s:duration">
<br>
</s:element>
<br>
<s:element name="DateTime" type="s:dateTime">
<br>
</s:element>
<br>
<s:element name="Date" type="s:date">
<br>
</s:element>
<br>
<s:element name="AnyURI" type="s:anyURI">
<br>
</s:element>
<br>
<s:element name="String" type="s:string">
<br>
</s:element>
<br>
<s:element name="Notation" type="s:NOTATION">
<br>
</s:element>
<br>
<s:element name="Qname" type="s:QName">
<br>
</s:element>
<br>
</s:choice>
<br> </s:complexType>
<br><s:complexType name="MyPrimativeType">
<br><s:sequence>
<br><s:element minOccurs="0" maxOccurs="1" name="myOPCPrimativeValue"
<br>type="s0:PrimativeValue" />
<br></s:sequence>
<br></s:complexType></blockquote>
</html>