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 92745 - CC should insert namespace declaration
Summary: CC should insert namespace declaration
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks: 89270
  Show dependency tree
 
Reported: 2007-01-18 00:55 UTC by Samaresh Panda
Modified: 2007-01-23 01:57 UTC (History)
1 user (show)

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 Samaresh Panda 2007-01-18 00:55:33 UTC
This is an extension of 92509.

Once clients implement their completion model providers and pass in the models,
the CC module should insert a namespace declaration.
Comment 1 Samaresh Panda 2007-01-18 19:47:45 UTC
Checking in util/DefaultModelProvider.java;
new revision: 1.1.2.4; previous revision: 1.1.2.3
Checking in util/CompletionUtil.java;
new revision: 1.1.2.21.6.5; previous revision: 1.1.2.21.6.4
Checking in util/CompletionContextImpl.java;
new revision: 1.1.2.8; previous revision: 1.1.2.7
Checking in CompletionQuery.java;
new revision: 1.1.2.5.22.4; previous revision: 1.1.2.5.22.3
Checking in CompletionResultItem.java;
new revision: 1.1.2.13.16.2; previous revision: 1.1.2.13.16.1
Checking in AttributeResultItem.java;
new revision: 1.1.2.3.16.1; previous revision: 1.1.2.3
Checking in ElementResultItem.java;
new revision: 1.1.2.2.20.1; previous revision: 1.1.2.2
Comment 2 Samaresh Panda 2007-01-23 01:57:15 UTC
Try the following example:

<xsd1:root xmlns:xsd1='http://xml.netbeans.org/schema/xsd1'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='http://xml.netbeans.org/schema/xsd1
xsd1.xsd yada xsd2.xsd'>
      <
</xsd1:root>

Where xsd1.xsd contains an xsd:any as a child of the root element. Hence you
should also get root element from xsd2 in the completion, but since there was no
namespace declaration for xsd2, CC will insert a namespace declaration for
xsd2's TNS with "ns1" as the prefix.