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.
The problem is in dev, not 5.0 Sorry bout that.
I'm just having all kinds of problems today... Apparently when I added that extra comment it got rid of my original description. Here it is again. I am doing some work with XML that involves Schemas. At first, everything was going fine when I had just this: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation='http://www.springframework.org/schema/beans file:/C:/Java/projects/UberWebsite/web/WEB-INF/schema/spring-beans-2.0.xsd'> (The entire xsi:schemaLocation was on one line) When I was getting ready to add a second schema, as per the Spring documentation, I had moved the first one down like this: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=' http://www.springframework.org/schema/beans file:/path-to-project/web/WEB-INF/schema/spring-beans-2.0.xsd'> (http:// ... beans-2.0.xsd is all on one line) And now suddenly the auto-completion is not working. I don't get any exceptions or anything, it just steps working. The same thing happens when I actually add the second schema like this: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation=' http://www.springframework.org/schema/beans file:/path-to-project/web/WEB-INF/schema/spring-beans-2.0.xsd http://www.springframework.org/schema/jee file:/path-to-project/web/WEB-INF/schema/spring-beans-2.0.xsd'> All of these are valid as far as I, and are the examples given in the Spring Framework documentation, except mine use local copies of the schemas.
This issue MUST be fixed in release55. Integrated in release55_dev. Please review: http://xml.netbeans.org/source/browse/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/Attic/CompletionQueryHelper.java?r1=1.1.2.19.6.1&r2=1.1.2.19.6.2 http://xml.netbeans.org/source/browse/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/Attic/CompletionUtil.java?r1=1.1.2.19.6.1&r2=1.1.2.19.6.2
Hao reported another use-case that didn't work. I have integrated the changes again. Here are the diffs: http://xml.netbeans.org/source/browse/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/CompletionQueryHelper.java?r1=1.1.2.19.6.2&r2=1.1.2.19.6.3 http://xml.netbeans.org/source/browse/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/CompletionUtil.java?r1=1.1.2.19.6.2&r2=1.1.2.19.6.3
Verified in 'patch' build 061012_7 (from release55_dev).
The diffs are ok.
Merged changes into release55. Marking this as fixed.
Verified in trunk build 061015.
The problem seems to be partially fixed, but not all of it is. This now works: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans file:/C:/Java/src/spring-framework-2.0/dist/resources/spring-beans-2.0.xsd"> (http://...beans-2.0.xsd is being wrapped) So the newline/whitespace issue is resolved. However, when I add a second schema the way the Spring documentation says to, it still breaks: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation=" http://www.springframework.org/schema/beans file:/C:/Java/src/spring-framework-2.0/dist/resources/spring-beans-2.0.xsd http://www.springframework.org/schema/jee file:/C:/Java/src/spring-framework-2.0/dist/resources/spring-jee-2.0.xsd"> (http://...beans-2.0.xsd is being wrapped) (http://...jee-2.0.xsd is being wrapped) Almost forgot to mention, I am using build 20061015.
The issue is not reproducible with build 061020 and jdk1.5.0_09, i.e. code completion seems to work for multiple schemas in these steps: open sample PO schema. open LoanApplication sample schema. create an XML Document using autoLoanApplication. observe: + code completion works in this case: <autoLoanApplication xmlns='http://xml.netbeans.org/examples/LoanApplication' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation=' http://xml.netbeans.org/examples/LoanApplication file:/C:/Z/JavaApplication1/src/newLoanApplication.xsd http://xml.netbeans.org/examples/PurchaseOrder file:/C:/Z/JavaApplication1/src/newpo.xsd'> </autoLoanApplication> + also works in this case: <autoLoanApplication xmlns='http://xml.netbeans.org/examples/LoanApplication' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation=' http://xml.netbeans.org/examples/LoanApplication file:/C:/Z/JavaApplication1/src/newLoanApplication.xsd http://xml.netbeans.org/examples/PurchaseOrder file:/C:/Z/JavaApplication1/src/newpo.xsd a b c'> </autoLoanApplication>
What do you mean by: open sample PO schema. open LoanApplication sample schema. I just copied in an example xml file from one of Spring Framework's examples and added the jee schema to the list. I didn't create the file in NetBeans, if that could make some kind of difference. Also, I'd download build 061020 but I don't see it on the download page.
*** Issue 87848 has been marked as a duplicate of this issue. ***
Thanks for clarifying the steps. We can now reproduce the problem and are working on it.
As a workaround, add a 'space' or a 'tab' after the newline or before the xsd file names. As soon as a fix is available, we'll update you with the build details.
Fix integrated into release55_dev CompletionUtil.java: new revision: 1.1.2.19.6.4;
CatalogModelHelper.java: new revision: 1.1.2.6.6.1;
Fixed in release55_dev and release55gavotte branch.
Verified in 061212_5.