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.
Create two new schemas: newXMLschema and newXMLschema_1. Open newXMLschema, right-click Elements > Add Element, name it 'root' right-click root > Add > Any right-click root > Add > Element, name it 'child' in Properties, make sure minoccurs=0 & maxoccurs=1 for both child & any Open newXMLschema_1, right-click Elements > Add Element, name it 'anotherRoot' right-click anotherRoot > Add > Element, name it 'anotherChild' rename namespace to 'yada' Create an XML Document with Schema URI=newXMLschema & Root Element=root Issue # 1 In the newXMLDocument.xml, invoke code completion => 'any' is treated as an element (such as 'child'), which is rather misleading. Either not include 'any' in the list or find a way to distinguish it somehow. Issue # 2 In the newXMLDocument.xml, try the following code: <nswww:root xmlns:nswww='http://xml.netbeans.org/schema/newXMLSchema' xmlns:nswww2="http://xml.netbeans.org/schema/newXMLSchema" xmlns:yada="yada" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://xml.netbeans.org/schema/newXMLSchema file:/C:/b/JavaApplication2/src/newXmlSchema.xsd yada file:/C:/b/JavaApplication2/src/newXmlSchema_1.xsd'> <yada:anotherRoot> ==> code completion's not working at this point. </yada:anotherRoot> </nswww:root> The same issues also apply to Any Attribute.
First set of changes integrated: Added new package/files: org/netbeans/modules/xml/schema/completion/spi/CompletionContext.java; org/netbeans/modules/xml/schema/completion/spi/CompletionModelProvider.java; org/netbeans/modules/xml/schema/completion/util/DefaultModelProvider.java; org/netbeans/modules/xml/schema/completion/util/CompletionContextImpl.java; META-INF/services/org.netbeans.modules.xml.schema.completion.spi.CompletionModelProvider Removed files: org/netbeans/modules/xml/schema/completion/util/CatalogModelHelper.java; org/netbeans/modules/xml/schema/completion/util/CompletionQueryHelper.java; Updated files: Checking in org/netbeans/modules/xml/schema/completion/util/CompletionUtil.java; new revision: 1.1.2.21.6.2; previous revision: 1.1.2.21.6.1 Checking in org/netbeans/modules/xml/schema/completion/CompletionQuery.java; new revision: 1.1.2.5.22.1; previous revision: 1.1.2.5 Checking in org/netbeans/modules/xml/schema/completion/SchemaBasedCompletionProvider.java; new revision: 1.1.2.11.20.1; previous revision: 1.1.2.11
Few more changes: /cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/AnyElementProxy.java, new revision: 1.1.2.7.20.2; previous revision: 1.1.2.7.20.1 /cvs/xml/axi/src/org/netbeans/modules/xml/axi/impl/AnyAttributeProxy.java, new revision: 1.1.2.6.20.2; previous revision: 1.1.2.6.20.1
Fix integrated, worth trying. Checking in spi/CompletionContext.java; new revision: 1.1.2.2; previous revision: 1.1.2.1 Checking in util/CompletionContextImpl.java; new revision: 1.1.2.3; previous revision: 1.1.2.2 Checking in util/CompletionUtil.java; new revision: 1.1.2.21.6.4; previous revision: 1.1.2.21.6.3 Checking in util/DefaultModelProvider.java; new revision: 1.1.2.3; previous revision: 1.1.2.2 Checking in CompletionQuery.java; new revision: 1.1.2.5.22.3; previous revision: 1.1.2.5.22.2
Issue # 1 - Verified in build 070117_9 with jdk 1.6.0. Issue # 2 - re-filed as issue 92740