Strange behaviour with EMF plugins [message #199188] |
Tue, 13 March 2007 04:50  |
Eclipse User |
|
|
|
Hi All,
Iam observing a strange behaviour w.r.t to my EMF plugins.
I think its a bug in EMF plugins. I hope this is the correct alias for
that.
Pl let me know if this is not the correct alias.
If this is the correct alias, Pl let me know how to solve this problem.
I have three schemas(xsd) Java.xsd, database.xsd, base.xsd.
Iam importing java.xsd and database.xsd into base.xsd.
Snippets of all these schemas are given at the end of this email.
For instantiating my schema Iam doing below
(a) Iam generating ecore and genmodel using base.xsd as input.
(b) Then Iam generating EMF edit and editor plugins.
(c) Launching a new instance of Eclipse and there Iam instantiating my
schema.
The problems I am observing are as described below
(1) Note that in base.xsd I have a sequence under referenceType.
This sequence has
<xs:any namespace="##other" processContents="strict" minOccurs="0"/>
So while instantiating an XML based on base.xsd, when I right click
on referenceType,I did get an option by name set(see database.xsd).
But the problem is the attribute in java.xsd that is javaAccess and
attribute in database.xsd that is cascade are not shown
under referenceType though in base.xsd , referenceType has below
<xs:anyAttribute namespace="##other" processContents="strict" />
(2) In Java.xsd , I have a simpleType by name JavaDataType.
Now when I try to instantiate an xml based on base.xsd
(which has import java.xsd),When I click on javaDataType the
options that I get are as given below
boolean
Boolean1
double
Double2
That is the case sensitivity of whatever I give in
double quotes under JavaDataType is getting ignored.
Its not able to differentiate between boolean and Boolean
The eclipse and related plugins installation details are as given below
==================================================
I have eclipse 3.2.1(Callisto) with EMF plugins with ver 2.2.1
Iam using EMF plugins of eclipse using which Iam instantiating the schema
and here Iam seeing that Strange behaviour.
I have installed XML Spy Enterprise Edition version 2007 sp2 and
corresponding Eclipse plugin.I am using XML Spy only for editing schemas.
Thanks,
Swayam
Java.xsd
------------
<?xml version="1.0" encoding="UTF-8"?>
<java:schema xmlns="http://www.cisco.com/abc/def/java"
xmlns:java="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.cisco.com/abc/def/java"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<java:simpleType name="JavaAccessType">
</java:simpleType>
<java:simpleType name="JavaDataType">
<java:restriction base="java:string">
<java:enumeration value="boolean"/>
<java:enumeration value="Boolean"/>
<java:enumeration value="double"/>
<java:enumeration value="Double"/>
.
</java:restriction>
</java:simpleType>
<java:simpleType name="Package">
<java:restriction base="java:string"/>
</java:simpleType>
<java:attribute name="javaAccess" type="JavaAccessType"/>
<java:attribute name="javaDataType" type="JavaDataType"/>
<java:attribute name="package" type="Package"/>
</java:schema>
Database.xsd
-------------
<?xml version="1.0" encoding="UTF-8"?>
<database:schema xmlns="http://www.cisco.com/abc/def/database"
xmlns:database="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.cisco.com/abc/def/database"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<database:simpleType name="DBInheritanceHierarchyType">
</database:simpleType>
<database:complexType name="CollectionType" abstract="true" >
<database:complexContent>
<database:restriction base="database:anyType">
<database:attribute name="KeyColumn" type="database:string"
use="required"/>
<database:attribute name="OneToManyClassName" type="database:string"
use="required"/>
</database:restriction>
</database:complexContent>
</database:complexType>
<database:complexType name="SetType">
<database:complexContent>
<database:extension base="CollectionType"/>
</database:complexContent>
</database:complexType>
<database:simpleType name="CascadeType">
<database:restriction base="database:string">
<database:enumeration value="all"/>
<database:enumeration value="none"/>
<database:enumeration value="save-update"/>
<database:enumeration value="delete"/>
<database:enumeration value="all-delete-orphan"/>
<database:enumeration value="delete-orphan"/>
</database:restriction>
</database:simpleType>
<database:attribute name="dBInheritanceHierarchy"
type="DBInheritanceHierarchyType"/>
<database:element name="set" type="SetType"/>
<database:attribute name="cascade" type="CascadeType"/>
</database:schema>
Base.xsd
---------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.cisco.com/abc/def"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:java="http://www.cisco.com/abc/def/java"
xmlns:database="http://www.cisco.com/abc/def/database"
targetNamespace="http://www.cisco.com/abc/def"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.cisco.com/abc/def/java"
schemaLocation="java.xsd"/>
<xs:import namespace="http://www.cisco.com/abc/def/database"
schemaLocation="database.xsd"/>
<xs:complexType name="referenceType">
<xs:sequence>
<xs:any namespace="##other" processContents="strict" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element ref="assert" minOccurs="0" maxOccurs="unbounded"/>
<!--xs:element name="Set" minOccurs="1" type="database:Set" /-->
</xs:sequence>
< !--xs:attribute name="JavaAccessType" type="java:JavaAccessType"/>
<xs:attribute name="Cascade" type="database:Cascade"/-->
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="targetIsA" type="xs:string" use="optional"/>
<xs:anyAttribute namespace="##other" processContents="strict" />
</xs:complexType>
</xs:schema>
|
|
|
Re: Strange behaviour with EMF plugins [message #199520 is a reply to message #199188] |
Wed, 14 March 2007 14:02  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
You've posted exactly the same question separately in the EMF newsgroup.
Please don't cross post separate questions.
SwayamPrakash wrote:
> Hi All,
>
> Iam observing a strange behaviour w.r.t to my EMF plugins.
> I think it�s a bug in EMF plugins. I hope this is the correct alias
> for that.
> Pl let me know if this is not the correct alias. If this is the
> correct alias, Pl let me know how to solve this problem.
>
> I have three schemas(xsd) Java.xsd, database.xsd, base.xsd.
> Iam importing java.xsd and database.xsd into base.xsd.
>
> Snippets of all these schemas are given at the end of this email.
>
> For instantiating my schema Iam doing below
> (a) Iam generating ecore and genmodel using base.xsd as input.
> (b) Then Iam generating EMF edit and editor plugins.
> (c) Launching a new instance of Eclipse and there Iam instantiating my
> schema.
>
>
> The problems I am observing are as described below
>
> (1) Note that in base.xsd I have a sequence under referenceType. This
> sequence has <xs:any namespace="##other" processContents="strict"
> minOccurs="0"/>
> So while instantiating an XML based on base.xsd, when I right click on
> referenceType,I did get an option by name �set�(see database.xsd).
> But the problem is the attribute in java.xsd that is �javaAccess� and
> attribute in database.xsd that is �cascade� are not shown under
> referenceType though in base.xsd , referenceType has below
> <xs:anyAttribute namespace="##other" processContents="strict" />
>
> (2) In Java.xsd , I have a simpleType by name �JavaDataType�.
> Now when I try to instantiate an xml based on base.xsd
> (which has import java.xsd),When I click on javaDataType the options
> that I get are as given below
>
> boolean
> Boolean1
> double
> Double2
> That is the case sensitivity of whatever I give in double quotes under
> JavaDataType is getting ignored.
> Its not able to differentiate between �boolean� and �Boolean�
> The eclipse and related plugins installation details are as given below
> ==================================================
> I have eclipse 3.2.1(Callisto) with EMF plugins with ver 2.2.1
> Iam using EMF plugins of eclipse using which Iam instantiating the
> schema and here Iam seeing that Strange behaviour.
> I have installed XML Spy Enterprise Edition version 2007 sp2 and
> corresponding Eclipse plugin.I am using XML Spy only for editing schemas.
>
> Thanks,
> Swayam
> Java.xsd
> ------------
> <?xml version="1.0" encoding="UTF-8"?>
> <java:schema xmlns="http://www.cisco.com/abc/def/java"
> xmlns:java="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.cisco.com/abc/def/java"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
>
> <java:simpleType name="JavaAccessType">
> ��
> </java:simpleType>
> <java:simpleType name="JavaDataType">
> <java:restriction base="java:string">
> <java:enumeration value="boolean"/>
> <java:enumeration value="Boolean"/>
> <java:enumeration value="double"/>
> <java:enumeration value="Double"/>
> ���������.
> </java:restriction>
> </java:simpleType>
>
> <java:simpleType name="Package">
> <java:restriction base="java:string"/> </java:simpleType>
> <java:attribute name="javaAccess" type="JavaAccessType"/>
> <java:attribute name="javaDataType" type="JavaDataType"/>
> <java:attribute name="package" type="Package"/>
> </java:schema>
>
> Database.xsd
> -------------
> <?xml version="1.0" encoding="UTF-8"?>
> <database:schema xmlns="http://www.cisco.com/abc/def/database"
> xmlns:database="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.cisco.com/abc/def/database"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
>
> <database:simpleType name="DBInheritanceHierarchyType">
> �����
> </database:simpleType>
> <database:complexType name="CollectionType" abstract="true" >
> <database:complexContent>
> <database:restriction base="database:anyType">
> <database:attribute name="KeyColumn" type="database:string"
> use="required"/>
> <database:attribute name="OneToManyClassName" type="database:string"
> use="required"/>
> </database:restriction>
> </database:complexContent>
> </database:complexType>
> <database:complexType name="SetType">
> <database:complexContent>
> <database:extension base="CollectionType"/>
> </database:complexContent>
> </database:complexType>
> <database:simpleType name="CascadeType">
> <database:restriction base="database:string">
> <database:enumeration value="all"/>
> <database:enumeration value="none"/>
> <database:enumeration value="save-update"/>
> <database:enumeration value="delete"/>
> <database:enumeration value="all-delete-orphan"/>
> <database:enumeration value="delete-orphan"/>
> </database:restriction>
> </database:simpleType>
> <database:attribute name="dBInheritanceHierarchy"
> type="DBInheritanceHierarchyType"/>
> <database:element name="set" type="SetType"/>
> <database:attribute name="cascade" type="CascadeType"/>
> </database:schema>
>
> Base.xsd
> ---------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns="http://www.cisco.com/abc/def"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:java="http://www.cisco.com/abc/def/java"
> xmlns:database="http://www.cisco.com/abc/def/database"
> targetNamespace="http://www.cisco.com/abc/def"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:import namespace="http://www.cisco.com/abc/def/java"
> schemaLocation="java.xsd"/>
> <xs:import namespace="http://www.cisco.com/abc/def/database"
> schemaLocation="database.xsd"/>
> <xs:complexType name="referenceType">
> <xs:sequence>
> <xs:any namespace="##other" processContents="strict" minOccurs="0"/>
> <xs:element name="description" type="xs:string" minOccurs="0"/>
> <xs:element ref="assert" minOccurs="0" maxOccurs="unbounded"/>
> <!--xs:element name="Set" minOccurs="1" type="database:Set" /-->
> </xs:sequence>
> < !--xs:attribute name="JavaAccessType" type="java:JavaAccessType"/>
> <xs:attribute name="Cascade" type="database:Cascade"/-->
> <xs:attribute name="name" type="xs:string" use="required"/>
> <xs:attribute name="targetIsA" type="xs:string" use="optional"/>
> <xs:anyAttribute namespace="##other" processContents="strict" />
> </xs:complexType>
> ���������
> ���������
> </xs:schema>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.08820 seconds