Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » XSD Enumeration issue
XSD Enumeration issue [message #51185] Mon, 23 August 2004 12:21 Go to next message
Eclipse UserFriend
Originally posted by: alastair.dunsmore.mottmac.com

I have a small problem with some EEnum Literals not appearing for an
annotation. This is highlighted in the following sample:

<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
<xsd:attribute name = "Direction">
<xsd:annotation>
<xsd:documentation>Direction</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base = "xsd:string">
<xsd:enumeration value = "Circular"/>
<xsd:enumeration value = "Clockwise"/>
<xsd:enumeration value = "Anti-Clockwise"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:schema>

If I import this via XSD into eclipse, then the generated Ecore does not
have EEnum Literals - instead i get a Key-Value pair with the
Key="enumeration" and Value has a space delimited string of the
Enumerations. If the 3rd enumeration, "Anti-Clockwise" is commented out
it works as expected. Is the "-" character causing this? Is this
character illegal in this usage context or is this a problem with XSD?

I am currenly using XSD v200408120834.

Thanks for you help,
Regards,
Alastair Dunsmore
Re: XSD Enumeration issue [message #51216 is a reply to message #51185] Mon, 23 August 2004 13:26 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------010401030703030403080701
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Alastair,

An EEnum is generated only if every enumeration value is a valid Java
identifier:

http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf



Alastair Dunsmore wrote:

>I have a small problem with some EEnum Literals not appearing for an
>annotation. This is highlighted in the following sample:
>
><?xml version = "1.0" encoding = "UTF-8"?>
><xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
> <xsd:attribute name = "Direction">
> <xsd:annotation>
> <xsd:documentation>Direction</xsd:documentation>
> </xsd:annotation>
> <xsd:simpleType>
> <xsd:restriction base = "xsd:string">
> <xsd:enumeration value = "Circular"/>
> <xsd:enumeration value = "Clockwise"/>
> <xsd:enumeration value = "Anti-Clockwise"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:attribute>
></xsd:schema>
>
>If I import this via XSD into eclipse, then the generated Ecore does not
>have EEnum Literals - instead i get a Key-Value pair with the
>Key="enumeration" and Value has a space delimited string of the
>Enumerations. If the 3rd enumeration, "Anti-Clockwise" is commented out
>it works as expected. Is the "-" character causing this? Is this
>character illegal in this usage context or is this a problem with XSD?
>
>I am currenly using XSD v200408120834.
>
>Thanks for you help,
>Regards,
>Alastair Dunsmore
>
>
>


--------------010401030703030403080701
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Alastair,<br>
<br>
An EEnum is generated only if every enumeration value is a valid Java
identifier:<br>
<blockquote><a
href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf</a><br>
</blockquote>
<br>
<br>
Alastair Dunsmore wrote:<br>
<blockquote cite="midcgcng0$v2a$1@eclipse.org" type="cite">
<pre wrap="">I have a small problem with some EEnum Literals not appearing for an
annotation. This is highlighted in the following sample:

&lt;?xml version = "1.0" encoding = "UTF-8"?&gt;
&lt;xsd:schema xmlns:xsd = <a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>&gt;
&lt;xsd:attribute name = "Direction"&gt;
&lt;xsd:annotation&gt;
&lt;xsd:documentation&gt;Direction&lt;/xsd:docum entation&gt;
&lt;/xsd:annotation&gt;
&lt;xsd:simpleType&gt;
&lt;xsd:restriction base = "xsd:string"&gt;
&lt;xsd:enumeration value = "Circular"/&gt;
&lt;xsd:enumeration value = "Clockwise"/&gt;
&lt;xsd:enumeration value = "Anti-Clockwise"/&gt;
&lt;/xsd:restriction&gt;
&lt;/xsd:simpleType&gt;
&lt;/xsd:attribute&gt;
&lt;/xsd:schema&gt;

If I import this via XSD into eclipse, then the generated Ecore does not
have EEnum Literals - instead i get a Key-Value pair with the
Key="enumeration" and Value has a space delimited string of the
Enumerations. If the 3rd enumeration, "Anti-Clockwise" is commented out
it works as expected. Is the "-" character causing this? Is this
character illegal in this usage context or is this a problem with XSD?

I am currenly using XSD v200408120834.

Thanks for you help,
Regards,
Alastair Dunsmore

</pre>
</blockquote>
<br>
</body>
</html>

--------------010401030703030403080701--
Re: XSD Enumeration issue [message #590724 is a reply to message #51185] Mon, 23 August 2004 13:26 Go to previous message
Ed Merks is currently online Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010401030703030403080701
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Alastair,

An EEnum is generated only if every enumeration value is a valid Java
identifier:

http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf



Alastair Dunsmore wrote:

>I have a small problem with some EEnum Literals not appearing for an
>annotation. This is highlighted in the following sample:
>
><?xml version = "1.0" encoding = "UTF-8"?>
><xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
> <xsd:attribute name = "Direction">
> <xsd:annotation>
> <xsd:documentation>Direction</xsd:documentation>
> </xsd:annotation>
> <xsd:simpleType>
> <xsd:restriction base = "xsd:string">
> <xsd:enumeration value = "Circular"/>
> <xsd:enumeration value = "Clockwise"/>
> <xsd:enumeration value = "Anti-Clockwise"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:attribute>
></xsd:schema>
>
>If I import this via XSD into eclipse, then the generated Ecore does not
>have EEnum Literals - instead i get a Key-Value pair with the
>Key="enumeration" and Value has a space delimited string of the
>Enumerations. If the 3rd enumeration, "Anti-Clockwise" is commented out
>it works as expected. Is the "-" character causing this? Is this
>character illegal in this usage context or is this a problem with XSD?
>
>I am currenly using XSD v200408120834.
>
>Thanks for you help,
>Regards,
>Alastair Dunsmore
>
>
>


--------------010401030703030403080701
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Alastair,<br>
<br>
An EEnum is generated only if every enumeration value is a valid Java
identifier:<br>
<blockquote><a
href=" http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf"> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /emf-home/docs/overviews/XMLSchemaToEcoreMapping.pdf</a><br>
</blockquote>
<br>
<br>
Alastair Dunsmore wrote:<br>
<blockquote cite="midcgcng0$v2a$1@eclipse.org" type="cite">
<pre wrap="">I have a small problem with some EEnum Literals not appearing for an
annotation. This is highlighted in the following sample:

&lt;?xml version = "1.0" encoding = "UTF-8"?&gt;
&lt;xsd:schema xmlns:xsd = <a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>&gt;
&lt;xsd:attribute name = "Direction"&gt;
&lt;xsd:annotation&gt;
&lt;xsd:documentation&gt;Direction&lt;/xsd:docum entation&gt;
&lt;/xsd:annotation&gt;
&lt;xsd:simpleType&gt;
&lt;xsd:restriction base = "xsd:string"&gt;
&lt;xsd:enumeration value = "Circular"/&gt;
&lt;xsd:enumeration value = "Clockwise"/&gt;
&lt;xsd:enumeration value = "Anti-Clockwise"/&gt;
&lt;/xsd:restriction&gt;
&lt;/xsd:simpleType&gt;
&lt;/xsd:attribute&gt;
&lt;/xsd:schema&gt;

If I import this via XSD into eclipse, then the generated Ecore does not
have EEnum Literals - instead i get a Key-Value pair with the
Key="enumeration" and Value has a space delimited string of the
Enumerations. If the 3rd enumeration, "Anti-Clockwise" is commented out
it works as expected. Is the "-" character causing this? Is this
character illegal in this usage context or is this a problem with XSD?

I am currenly using XSD v200408120834.

Thanks for you help,
Regards,
Alastair Dunsmore

</pre>
</blockquote>
<br>
</body>
</html>

--------------010401030703030403080701--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:XSD Enumeration issue
Next Topic:What about the future of XSDEdit?
Goto Forum:
  


Current Time: Thu Apr 25 15:08:46 GMT 2024

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

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

Back to the top