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 86891 - xsi:schemaLocation not being read properly by auto-completer
Summary: xsi:schemaLocation not being read properly by auto-completer
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
: 87848 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-10 21:35 UTC by nivek98
Modified: 2006-12-13 22:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nivek98 2006-10-10 21:47:43 UTC
The problem is in dev, not 5.0  Sorry bout that.
Comment 1 nivek98 2006-10-11 00:27:35 UTC
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.
Comment 4 htt 2006-10-13 06:58:45 UTC
Verified in 'patch' build 061012_7 (from release55_dev).
Comment 5 Chris Webster 2006-10-13 14:52:12 UTC
The diffs are ok. 
Comment 6 Samaresh Panda 2006-10-13 16:18:24 UTC
Merged changes into release55. Marking this as fixed.
Comment 7 htt 2006-10-16 18:06:15 UTC
Verified in trunk build 061015.
Comment 8 nivek98 2006-10-23 04:11:44 UTC
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.
Comment 9 htt 2006-10-23 15:59:38 UTC
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>
Comment 10 nivek98 2006-10-23 21:28:23 UTC
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.
Comment 11 Samaresh Panda 2006-10-24 18:17:35 UTC
*** Issue 87848 has been marked as a duplicate of this issue. ***
Comment 12 htt 2006-10-24 18:17:39 UTC
Thanks for clarifying the steps.  We can now reproduce the problem and are
working on it.
Comment 13 Samaresh Panda 2006-10-24 22:40:39 UTC
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.
Comment 14 Samaresh Panda 2006-10-26 00:37:33 UTC
Fix integrated into release55_dev
CompletionUtil.java: new revision: 1.1.2.19.6.4;
Comment 15 Samaresh Panda 2006-10-26 00:56:24 UTC
CatalogModelHelper.java: new revision: 1.1.2.6.6.1;
Comment 16 Samaresh Panda 2006-11-13 22:01:52 UTC
Fixed in release55_dev and release55gavotte branch.
Comment 17 htt 2006-12-13 22:41:33 UTC
Verified in 061212_5.