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 138869 - XML documant wizard ignores namespace prefix for additional namespaces
Summary: XML documant wizard ignores namespace prefix for additional namespaces
Status: VERIFIED INVALID
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-02 22:06 UTC by tonybeckham
Modified: 2008-07-07 19:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
schema NamespaceA (537 bytes, text/plain)
2008-07-02 22:07 UTC, tonybeckham
Details
schema NamespaceB (621 bytes, text/plain)
2008-07-02 22:07 UTC, tonybeckham
Details
Screen shot of existing functioning generation (181.75 KB, image/png)
2008-07-07 19:55 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 22:06:35 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:
The new XML file wizard allows you to generate a schema constrained document and have custom namespace prefix.  If using
default, then each additional namespace generated is in numerically incremented order.  However, if you set a custom
prefix, subsiquent prefixes start @ ns1

Steps:
1. Add the two attached schemas to a project
2. Select new file->XML->XML DOcument
3. In the wizard choose Schema constrained
4. Browse and select NamespaceB schema
5. for the prefix field change to ns3 and finish the wizard
6. first namespace will have ns3 prefix second schema will have ns1 prefix.  

It may be a problem if there were a scenario where there were 4 necessary namespace declarations.  In that case setting
first as ns3 second=ns1 third=ns2 and fourth=ns3 <problem here>
Comment 1 tonybeckham 2008-07-02 22:07:16 UTC
Created attachment 63848 [details]
schema NamespaceA
Comment 2 tonybeckham 2008-07-02 22:07:45 UTC
Created attachment 63849 [details]
schema NamespaceB
Comment 3 Sonali Kochar 2008-07-02 23:01:10 UTC
Can you try this with 4 schemas? As far as the code goes, duplicate prefixes will not be generated..
you should see:
first as ns3 second=ns1 third=ns2 and fourth=ns4 < anything other than ns3>

Can you verify?
Comment 4 tonybeckham 2008-07-03 20:42:32 UTC
I'm not sure if you understand the problem.  Have you tried following the steps to reproduce?  It is not just generating
XML document after XML document, but refers to generating XML for a schema that references other schema (or possibly
more than one schema).
Comment 5 tonybeckham 2008-07-07 19:54:29 UTC
I tested with many referenced elements.  I think this is not a bug.  Maybe an enhancement.  I think all namespaces
should be generated chronologically, not start at some number (ns3) then generate referenced namespaces at 1 and skip 3.
 Just preference.  Closing as invalid.
Comment 6 tonybeckham 2008-07-07 19:55:42 UTC
Created attachment 64023 [details]
Screen shot of existing functioning generation
Comment 7 tonybeckham 2008-07-07 19:56:45 UTC
Verified.  See screen shot.  Works as described in desc 4.