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.
System: Product Version: NetBeans IDE Dev (Build 200807021206) Java: 1.6.0_05; Java HotSpot(TM) 64-Bit Server VM 1.6.0_05-b13-52 System: Mac OS X version 10.5.4 running on x86_64; MacRoman; en_US (nb) Problem: There are two ways to generate a sample XML document, 1) via context menu of a schema, 2) New XML wizard and use schema constrained. Generating sample document one way will start namespace declarations as ns0 and increment for additional ones necessary. Generating the other way will begin namespace declarations starting with ns1. Steps: 1. Add the two attached schema to a project 2. Generate sample XML from context menu of NamespaceB schema. There are 2 namespace declarations ns0 and ns1 3. Create a new XML file, select schema constrained and choose NamespaceB schema from By File node and set as primary. Notice prefix is set as ns1. 4. Finish wizard, namespace prefixes are ns1 and ns2
Created attachment 63846 [details] first schema NamespaceA
Created attachment 63847 [details] Second schema NamespaceB
Yes the prefixes are different but they are two different XML files. What is broken here? I am not sure if this is a bug.
The issue is that XML document generation assigns prefixes for namespaces differently based on how the XML document is generated. Generating an XML document for the same schema, one way will start namespace prefix with ns0 and the other with prefix ns1. They are two different XML files, just inconsistent in the content generated. It should be expected that no matter what way XML document is created from a schema the XML document will be the same.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss