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 138868 - Inconsistent namspace declaration generating XML document from schema
Summary: Inconsistent namspace declaration generating XML document from schema
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P4 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-02 21:58 UTC by tonybeckham
Modified: 2016-07-07 09:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
first schema NamespaceA (537 bytes, text/plain)
2008-07-02 21:59 UTC, tonybeckham
Details
Second schema NamespaceB (621 bytes, text/plain)
2008-07-02 21:59 UTC, tonybeckham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2008-07-02 21:58:26 UTC
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
Comment 1 tonybeckham 2008-07-02 21:59:06 UTC
Created attachment 63846 [details]
first schema NamespaceA
Comment 2 tonybeckham 2008-07-02 21:59:25 UTC
Created attachment 63847 [details]
Second schema NamespaceB
Comment 3 Sonali Kochar 2008-07-02 23:16:54 UTC
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.
Comment 4 tonybeckham 2008-07-03 20:38:23 UTC
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. 
Comment 5 Martin Balin 2016-07-07 09:56:55 UTC
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