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 96249 - Resolver cannot distinguish artifacts from duplicate namespace.
Summary: Resolver cannot distinguish artifacts from duplicate namespace.
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Catalog Support (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-22 01:18 UTC by htt
Modified: 2007-09-25 01:34 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description htt 2007-02-22 01:18:40 UTC
Create sample BluePrint1
  File > New Project > Samples > SOA > BPEL BluePrints > BluePrint1
Create sample BluePrint2
  File > New Project > Samples > SOA > BPEL BluePrints > BluePrint2
Create a Bpel module:
  File > New Project > SOA > BPEL Module
In Projects,
  1. right-click BpelModule1 > Properties
     select Project References; Add Project BluePrint1 & BluePrint2; OK
     expand BpelModule1
     right-click Process Files > New > File/Folder > XML > XML Schema; Finish
  2. repeat the following set of steps for BluePrint1 then BluePrint2:
     expand all of BluePrint<1,2>
     open inventory.xsd
     in the source editor,
       expand Complex Types
       right-click inventoryType > Refactor > Rename
       rename inventoryType from BluePrint1 to BP1inventoryType and
inventoryType from BluePrint2 to BP2inventoryType
  3. open newXmlSchema.  In the source editor,
       right-click Referenced Schemas > Add > Imports
       expand all of By File; select both versions of inventory.xsd; OK
       right-click Elements > Add Element:
         e1 of type BP1inventoryType
         e2 of type BP2inventoryType
       click Validate
       ==> C:/b/BpelModule2/src/newXmlSchema.xsd:10,4
           Error: src-resolve: Cannot resolve the name 'ns0:BP2inventoryType' to
a(n) 'type definition' component.
       In source view, observe:
          <xsd:element name="e1" type="ns0:BP1inventoryType"></xsd:element>
          <xsd:element name="e2" type="ns0:BP2inventoryType"></xsd:element>
Comment 1 htt 2007-02-22 01:20:21 UTC
Comments by nnguyen (07/02/21): "we should have prevented adding/change Import
which result in redundant imported namespaces, making it impossible for resolver
to determine the reference based on prefix.  There is no association b/ import
and prefix declaration."   Also see issue 96246.
Comment 2 Nam Nguyen 2007-03-05 17:55:48 UTC
Apparently the JDK validation takes the first import entry matched the namespace
and trying to use location BluePrint2/inventory.xsd to resolve the reference to
BP1inventoryType.  This is allow by the specs.  Applications (JDK validator in
this case) is not required to exhaustively search all import entries for one
namespace during type reference.

On the other hand, by specs we could not disallow multiple imports for the same
namespace.  The best fix is put up a WARNING in the import wizard message line.
 This is actually user experience enhancement to prevent not recommended
reference practice: -> ENHANCEMENT.

Target for 6.0.  Unassign for prioritize and actual resource at the time.