Home » Archived » XML Schema Definition (XSD) » SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute
SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute [message #62536] |
Thu, 07 July 2005 21:27 |
Dennis Fuglsang Messages: 77 Registered: July 2009 |
Member |
|
|
I attempted to set the LexicalFinal attribute on a XSDSimpleTypeDefinition
instance using a SetCommand. Unfortunately, the command fails preparation
(SetCommand.prepare() returns false) because the string value does not match
any of the enumeration literal values for this EAttribute. The XSDSimpleTypeDefinitionItemProvider
class creates a specialized ItemPropertyDescriptor for this attribute with
the choice values representing all the various combinations of {restriction,
list, union} - "restriction", "restriction list", "restriction list union",
"restriction union", etc.. The EType for this property is XSD_SIMPLE_FINAL
which only has the enumeration values of {all, restriction, list, union}
so many of the choice values will never match the enumeration literal values
and eType.isInstance(value) checks fail. Can SetCommand not be used with
the feature? Is there a different way to set this feature value within the
Command framework?
Thanks in advance,
Dennis Fuglsang
|
|
|
Re: SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute [message #62561 is a reply to message #62536] |
Thu, 07 July 2005 21:37 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Dennis,
You need to create a list of XSDSimpleFinal values, not a String or list
of Strings, as the value to set.
dfuglsang wrote:
> I attempted to set the LexicalFinal attribute on a
> XSDSimpleTypeDefinition instance using a SetCommand. Unfortunately,
> the command fails preparation (SetCommand.prepare() returns false)
> because the string value does not match any of the enumeration literal
> values for this EAttribute. The XSDSimpleTypeDefinitionItemProvider
> class creates a specialized ItemPropertyDescriptor for this attribute
> with the choice values representing all the various combinations of
> {restriction, list, union} - "restriction", "restriction list",
> "restriction list union", "restriction union", etc.. The EType for
> this property is XSD_SIMPLE_FINAL which only has the enumeration
> values of {all, restriction, list, union} so many of the choice values
> will never match the enumeration literal values and
> eType.isInstance(value) checks fail. Can SetCommand not be used with
> the feature? Is there a different way to set this feature value
> within the Command framework?
>
> Thanks in advance,
>
> Dennis Fuglsang
>
>
|
|
|
Re: SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute [message #596078 is a reply to message #62536] |
Thu, 07 July 2005 21:37 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Dennis,
You need to create a list of XSDSimpleFinal values, not a String or list
of Strings, as the value to set.
dfuglsang wrote:
> I attempted to set the LexicalFinal attribute on a
> XSDSimpleTypeDefinition instance using a SetCommand. Unfortunately,
> the command fails preparation (SetCommand.prepare() returns false)
> because the string value does not match any of the enumeration literal
> values for this EAttribute. The XSDSimpleTypeDefinitionItemProvider
> class creates a specialized ItemPropertyDescriptor for this attribute
> with the choice values representing all the various combinations of
> {restriction, list, union} - "restriction", "restriction list",
> "restriction list union", "restriction union", etc.. The EType for
> this property is XSD_SIMPLE_FINAL which only has the enumeration
> values of {all, restriction, list, union} so many of the choice values
> will never match the enumeration literal values and
> eType.isInstance(value) checks fail. Can SetCommand not be used with
> the feature? Is there a different way to set this feature value
> within the Command framework?
>
> Thanks in advance,
>
> Dennis Fuglsang
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Sun Dec 22 05:00:19 GMT 2024
Powered by FUDForum. Page generated in 0.03545 seconds
|