This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 95327 - incorrect code generation of attribute dropped onto element
Summary: incorrect code generation of attribute dropped onto element
Status: VERIFIED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-12 23:01 UTC by tonybeckham
Modified: 2007-04-06 18:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2007-02-12 23:01:49 UTC
When an attribute is dropped on an element that is of a simple type like
'xsd:boolean", the code generated should be 

<element name="e1">
 <complexType>
  <simpleContent>
   <extension base="xsd:boolean">
    <attribute name="a1" type="xsd:string"/>
   </extension>
  </simpleContent>
 </complexType>
</element>

instead of current

<element name="e1">
 <complexType>
    <attribute name="a1" type="xsd:string"/>
 </complexType>
</element>
Comment 1 Ayub Khan 2007-02-26 23:41:21 UTC
Fixed in 551

Files changed:

/cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/DefaultSchemaGenerator.java
new revision: 1.1.2.67.6.5; previous revision: 1.1.2.67.6.4

/cvs/xml/axi/test/unit/src/org/netbeans/modules/xml/axi/SchemaGeneratorTest.java
new revision: 1.1.2.10.6.2; previous revision: 1.1.2.10.6.1

Comment 2 tonybeckham 2007-03-01 21:57:15 UTC
Reopening, in build: 070301_8 still see the same code generation that needs to
be changed changed.
Comment 3 htt 2007-03-01 23:04:11 UTC
Looks like the fix is in 070301_5.  Please re-verify.
Comment 4 Ayub Khan 2007-03-07 22:17:29 UTC
Hi Tony,

Can you please verify and close this bug.

Thanks
Ayub
Comment 5 Samaresh Panda 2007-04-06 18:07:05 UTC
Here is the detailed steps to verify this:

- In DV, drop an element
- change the element's type to some simple type
- now, drop an attribute on the element.
Comment 6 tonybeckham 2007-04-06 18:11:21 UTC
Verified in Milestone8a.  Using the steps provided creates the desired code
generation.