Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 187302

Summary: XSD Editor can't set type if namespace is null
Product: [WebTools] WTP Source Editing Reporter: Jose Luis Martinez <jlmartinez>
Component: wst.xsdAssignee: Keith Chong <keith.chong.ca>
Status: CLOSED DUPLICATE QA Contact: Keith Chong <keith.chong.ca>
Severity: major    
Priority: P3 CC: thatnitind, valentinbaciu
Version: 1.5.4Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jose Luis Martinez CLA 2007-05-16 12:18:56 EDT
The Visual XSD Editor doesn't let you assign element type if the schema prefix and target namespace is not set.

To reproduce:
- create new xsd
- create a root element (name "element1") with a new complex type
- set schema properties Prefix and Target namespace to nothing
Bug: "element1" disappears (I'll file this bug apart from this one)
- create new element (old element appears)
- delete new element (only used to make the old one appear)
- Edit complex type of element1
- Create element xxx with new simple type "type1"
- Create element yyy.
- Assign yyy type "type1" (with Set Type->browse)
Bug: type is not assigned


Another way to reproduce:
Load this xsd (generated with xsd editor), and try to assign "stype1" to element "yyy" in ComplexType "ctype":

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="rootelement" type="ctype"></xsd:element>
    
    <xsd:complexType name="ctype">
    	<xsd:sequence>
    		<xsd:element name="xxx" type="stype1"></xsd:element>
    		<xsd:element name="yyy" type="xsd:string"></xsd:element>
    	</xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="stype1">
    	<xsd:restriction base="xsd:string"></xsd:restriction>
    </xsd:simpleType>

</xsd:schema>
Comment 1 Keith Chong CLA 2007-10-17 18:39:28 EDT
The problem is fixed in bug 103870.  Please verify using the latest WTP 3.0.

*** This bug has been marked as a duplicate of bug 103870 ***
Comment 2 Valentin Baciu CLA 2007-10-24 10:54:24 EDT
This is a message for the bug reporter: please take a few minutes and verify the bug. If we don't hear back in a week's time we'll mark as verified and close it. Thank you.
Comment 3 Valentin Baciu CLA 2007-11-20 09:31:35 EST
Closing. Please re-open if you disagree with the resolution.