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.
When viewing XML schema that makes use of xsd:include the referenced types are not show properly in the schema editor. I'm using the XCBL schema www.xcbl.org When opening the file ordermanagement.xsd and viewing the structure of the Order type, it is not possible to view the details of the OrderDetail node which consists e.g. of an ListOfItemDetail node, that contains a list of ItemDetail entries, but these cannot be expanded in NetBeans. Screenshots showing the schema display in NetBeans and e.g. XMLPad are attached
Created attachment 53534 [details] Display of the OrderDetail node in NetBeans (ordermanagement.xsd)
Created attachment 53535 [details] Expandable display of the same node in XMLPad
Reason being, ordermanagement.xsd includes OrderType.xsd and uses OrderType from there. OrderType in turn uses OrderDetailType defined in OrderDetailType.xsd, however, OrderType.xsd doesn't include OrderDetailType.xsd. If you include OrderDetailType.xsd in OrderType.xsd, you'll be able to see that. Ideally, it should just work, but doesn't because of the way we resolve types.
Sam I raised the priority to P2 since it impacts BPEL mapper. It was discussion about Dean's case.
Fixed: http://hg.netbeans.org/main/rev/75e9f2bcef5d
I believe you meant 6.5M1 as the target milestone.
Fix Verified Product Version: NetBeans IDE Dev (Build 200806181204) 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.3 running on x86_64; MacRoman; en_US (nb)
The applied solution can cause serious performance problems. It is based on analysis of all Include dependences between all Schema models are loaded by NetBeans. Here is the code snippet, which illustrates it: for(SchemaModel m: SchemaModelFactory.getDefault().getModels()) { Moreover, the result can depend on content of schema models cache. Models are loaded by request so at the beginning not all models are loaded. It can come to impossibility to resolve some references. It is suggested to filter out only relevant schema models. Full set of schema models can be separated by projects. It doesn't make sense to try comparing models from different projects. Having such subsets of schema models can significantly improve performance in some cases. I reopened the issue and changed it to ENHANCEMENT.
The current solution allows resolving only simple situations: A includes B and C. Declarations from C aren't visible in B. Any more complex cases, for example, with more deep inclusion, don't work.
Here is the new fix: http://hg.netbeans.org/main/rev/fa892484223b It resolves problem with "only one layer inclusion", so now it is possible to resolve complex inclusion. Corresponding test is added: SchemaModelTest.testResolve6() Also the algorithm is partly optimized. But it still hasn't manage to restrict scope, in which models' inclusion is analyzed. Fortunately it turned out that it works fast enough because of models' dependencies caching (issue #158236). But it is still necessary to resolve issue #168376. I don't close the issue now because I'm going to try applying another one optimization. The use case is discussed in the issue seems quite exotic. In most cases the schema files includes each other if they use each other. So the resolving approach has to be used as a latest attempt and only once per a resolve call. It seems now it can be called several times. It's necessary to check and improve.
Integrated into 'main-golden', will be available in build *200907140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/fa892484223b User: supernikita@netbeans.org Log: #122836 - xsd:include not properly resolved
Fix http://hg.netbeans.org/main/rev/b87dba7b7d94 I've replaced the schema resolution algorithm. It has become more complex but now the different resolution ways are prioritized and the mega-include is executed at the end of the queue. Also I've done refactoring of the schema resolving tests and added about 10 new tests.
Integrated into 'main-golden', will be available in build *200907240201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b87dba7b7d94 User: supernikita@netbeans.org Log: #122836 - xsd:include not propertly resolved
Verified with JUnit tests + verifying different BPEL projects
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/3d7907823d1b http://hg.netbeans.org/release67_fixes/rev/afb2e06b184f
Verified by Michael Nazarov.