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 113574 - Schema based code completion using catalog bug
Summary: Schema based code completion using catalog bug
Status: RESOLVED DUPLICATE of bug 112329
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker with 3 votes (vote)
Assignee: issues@xml
Depends on:
Reported: 2007-08-23 09:01 UTC by cr
Modified: 2007-09-25 01:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

sample project (10.59 KB, application/octet-stream)
2007-08-23 09:02 UTC, cr

Note You need to log in before you can comment on or make changes to this bug.
Description cr 2007-08-23 09:01:25 UTC
XML code completion is not working when xml grammar is loaded from runtime catalog and schema references other schemas
using include tag.

When code completion is invoked following exception is thrown:
	at org.netbeans.modules.xml.xam.AbstractModelFactory.getModel(
	at org.netbeans.modules.xml.schema.model.SchemaModelFactory.getModel(
	at org.netbeans.modules.xml.schema.model.impl.IncludeImpl.resolveReferencedModel(
	at org.netbeans.modules.xml.axi.impl.AXIModelImpl.buildReferenceableCache(
	at org.netbeans.modules.xml.axi.impl.ModelAccessImpl.sync(
	at org.netbeans.modules.xml.xam.AbstractModel.sync(
	at org.netbeans.modules.xml.axi.impl.AXIModelImpl.sync(
	at org.netbeans.modules.xml.xam.AbstractModelFactory.getModel(
	at org.netbeans.modules.xml.axi.AXIModelFactory.getModel(
	at org.netbeans.modules.xml.axi.AXIModelFactory.getModel(
	at org.netbeans.modules.xml.schema.completion.util.CompletionUtil.findAXIElementAtContext(
	at org.netbeans.modules.xml.schema.completion.util.CompletionUtil.getElements(
	at org.netbeans.modules.xml.schema.completion.CompletionQuery.getCompletionItems(
	at org.netbeans.modules.xml.schema.completion.CompletionQuery.query(
	at org.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$

Using Netbeans 6.0 M10 or (latest) build 200708211200 and Java6

Steps to reproduce:
1. create schema that includes other schemas
2. create XML catalog that contains these schemas
3. run and try to edit XML based on schema

Sample project included
Comment 1 cr 2007-08-23 09:02:40 UTC
Created attachment 47144 [details]
sample project
Comment 2 Samaresh Panda 2007-09-02 17:26:04 UTC
Richard, this has been fixed.

In catalog, relative path for included/imported schemas will not work, hence they must specify the system-id. For
example if A was the primary schema and B and C are included in A, here is how it'll look like:

<xsd:include schemaLocation=""/>
<xsd:include schemaLocation=""/>

Assuming that and are the system-id for A and B.

*** This issue has been marked as a duplicate of 112329 ***