Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Dennis Fuglsang is currently offline Dennis FuglsangFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute
Next Topic:XML generating wizard
Goto Forum:
  


Current Time: Sun Dec 22 05:00:19 GMT 2024

Powered by FUDForum. Page generated in 0.03545 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top