Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358163 - XSDSchema.update does not update ref attribute on DOM element
Summary: XSDSchema.update does not update ref attribute on DOM element
Status: RESOLVED WORKSFORME
Alias: None
Product: EMF
Classification: Modeling
Component: XSD (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 18:47 EDT by Shane Cartledge CLA
Modified: 2023-01-12 11:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shane Cartledge CLA 2011-09-19 18:47:10 EDT
Build Identifier: org.eclipse.xsd_2.6.0



<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<xsd:element name="globalElement1">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="globalElement2"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="globalElement2">
		<xsd:complexType/>
	</xsd:element>

</xsd:schema>

Reproducible: Always

Steps to Reproduce:
1. Load the following schema:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:element name="globalElement1">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="globalElement2"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="globalElement2">
		<xsd:complexType/>
	</xsd:element>
</xsd:schema>

2. In the model rename globalElement2 to globalElement2A.
 
4. The ref attribute on the DOM object for the reference XSDElementDeclaration will still be ref="globalElement2".

5. Call update(true) on the XSDSchema object. Expected: The ref attribute on the DOM object will be updated to "globalElement2A". Actual: The ref attribute is not updated and is still "globalElement2".
Comment 1 Ed Merks CLA 2012-04-05 00:52:43 EDT
You need to call updateElement(true) to fully update the DOM to reflect the model changes.