Skip to main content



      Home
Home » Archived » XML Schema Definition (XSD) » Enumeration S.Type: How to add values?
Enumeration S.Type: How to add values? [message #17012] Mon, 07 April 2003 18:17 Go to next message
Eclipse UserFriend
Originally posted by: dirk.schesmer.divos.de

Hi there,
I'm a newbee in this group and would like to learn about how to add value to
an <<Enumeration>> Simple Type like the S.T. Status: available, negotaiting,
sold (taken from the Car example in Mastering XMI)

I know how to do it using the XMIFramework, but how to add values using
EMF/XSD (this indeed sooo much more powerful framework!)
XSDPrototypicalSchema.java just show me how to add the first enum value, but
what about more of them ?

XSDEnumerationFacet xsdEnumerationFacet =
xsdFactory.createXSDEnumerationFacet();

xsdEnumerationFacet.setLexicalValue("unknown");

Thanks for help,

Dirk V. Schesmer
Re: Enumeration S.Type: How to add values? [message #17071 is a reply to message #17012] Mon, 07 April 2003 19:17 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Dirk,

Each concrete enumeration facet holds only one value, so you simply create
another XSDEnumerationFacet and add it to the facet contents too. (All the
different concrete enumeration facets are composed as a single synthetic
enumeration facet that holds a list of values.)

"Dirk V. Schesmer" wrote:

> Hi there,
> I'm a newbee in this group and would like to learn about how to add value to
> an <<Enumeration>> Simple Type like the S.T. Status: available, negotaiting,
> sold (taken from the Car example in Mastering XMI)
>
> I know how to do it using the XMIFramework, but how to add values using
> EMF/XSD (this indeed sooo much more powerful framework!)
> XSDPrototypicalSchema.java just show me how to add the first enum value, but
> what about more of them ?
>
> XSDEnumerationFacet xsdEnumerationFacet =
> xsdFactory.createXSDEnumerationFacet();
>
> xsdEnumerationFacet.setLexicalValue("unknown");
>
> Thanks for help,
>
> Dirk V. Schesmer
Re: Enumeration S.Type: How to add values? [message #567217 is a reply to message #17012] Mon, 07 April 2003 19:17 Go to previous message
Eclipse UserFriend
Dirk,

Each concrete enumeration facet holds only one value, so you simply create
another XSDEnumerationFacet and add it to the facet contents too. (All the
different concrete enumeration facets are composed as a single synthetic
enumeration facet that holds a list of values.)

"Dirk V. Schesmer" wrote:

> Hi there,
> I'm a newbee in this group and would like to learn about how to add value to
> an <<Enumeration>> Simple Type like the S.T. Status: available, negotaiting,
> sold (taken from the Car example in Mastering XMI)
>
> I know how to do it using the XMIFramework, but how to add values using
> EMF/XSD (this indeed sooo much more powerful framework!)
> XSDPrototypicalSchema.java just show me how to add the first enum value, but
> what about more of them ?
>
> XSDEnumerationFacet xsdEnumerationFacet =
> xsdFactory.createXSDEnumerationFacet();
>
> xsdEnumerationFacet.setLexicalValue("unknown");
>
> Thanks for help,
>
> Dirk V. Schesmer
Previous Topic:xmlns attribute without prefix in schema tag: How to?
Next Topic:xmlns attribute without prefix in schema tag: How to?
Goto Forum:
  


Current Time: Sun Jul 13 22:01:47 EDT 2025

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

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

Back to the top