Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330200 - Provide means for user to abort "Create XML Schema to Ecore Map"
Summary: Provide means for user to abort "Create XML Schema to Ecore Map"
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: XML/XMI (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-14 12:12 EST by beny CLA
Modified: 2013-07-10 11:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description beny CLA 2010-11-14 12:12:51 EST
Build Identifier: Occurs on 3.5, 3.6, and 3.7

Something about the XSD at "http://www.ddialliance.org/sites/default/files/Version2-1.xsd" causes the "Create XML Schema to Ecore Map" option to never complete, hanging the IDE.

If the problem is with the schema, the mapping software should be enhanced to detect the problem and exit with an error. 

Thank you for helping me with this issue. 


Reproducible: Always

Steps to Reproduce:
1. Create a new EMF project
2. Specify to create from an XSD
3. Enter in the URI "http://www.ddialliance.org/sites/default/files/Version2-1.xsd"  (or alternatively download that XSD to your machine and select it via the appropriate button)
4. Click "Create XML Schema to Ecore Map"; app will hang
5. Leave your computer running overnight;  never finishes
Comment 1 beny CLA 2010-11-14 12:52:41 EST
I was able to clear this up by commenting out a portion of the XSD.  I commented out the elements used in the group "FORM", i.e.
    
         ...
	<xs:group name="FORM">
		<xs:choice>
			<xs:element name="div" type="divType"/>
			<xs:element name="emph" type="emphType"/>
			<xs:element name="head" type="headType"/>
			<xs:element name="hi" type="hiType"/>
			<xs:element name="itm" type="itmType"/>
			<xs:element name="list" type="listType"/>
			<xs:element name="p" type="pType"/>
		</xs:choice>
	</xs:group>
        ...

became

         ...
	<xs:group name="FORM">
		<xs:choice>
		<!-- <xs:element name="div" type="divType"/>
		   <xs:element name="emph" type="emphType"/>
		   <xs:element name="head" type="headType"/>
	     	   <xs:element name="hi" type="hiType"/>
		   <xs:element name="itm" type="itmType"/>
		   <xs:element name="list" type="listType"/>
		   <xs:element name="p" type="pType"/> -->
		</xs:choice>
	</xs:group>
        ...

The XSD apparently uses this group in 118 elements, and each of the element types here are recursive, in that e.g. divType, pType, etc. also use the FORM group.   So, I'm thinking this probably WOULD finish, if I just gave the code a couple of days to run.  

Therefore, this isn't so much a bug as a feature request for a means to abort a long-running "Create XML Schema to Ecore Map" execution.  I'll modify the bug as such. 

Thanks for your time. 

(In reply to comment #0)
> Build Identifier: Occurs on 3.5, 3.6, and 3.7
> 
> Something about the XSD at
> "http://www.ddialliance.org/sites/default/files/Version2-1.xsd" causes the
> "Create XML Schema to Ecore Map" option to never complete, hanging the IDE.
> 
> If the problem is with the schema, the mapping software should be enhanced to
> detect the problem and exit with an error. 
> 
> Thank you for helping me with this issue. 
> 
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Create a new EMF project
> 2. Specify to create from an XSD
> 3. Enter in the URI
> "http://www.ddialliance.org/sites/default/files/Version2-1.xsd"  (or
> alternatively download that XSD to your machine and select it via the
> appropriate button)
> 4. Click "Create XML Schema to Ecore Map"; app will hang
> 5. Leave your computer running overnight;  never finishes
Comment 3 Ed Merks CLA 2013-07-10 11:27:38 EDT
The changes are available in Kepler.