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 127514 - Code Completion not working with local schema in User Catalog
Summary: Code Completion not working with local schema in User Catalog
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 2 votes (vote)
Assignee: Samaresh Panda
URL:
Keywords:
: 142126 (view as bug list)
Depends on:
Blocks: 138486
  Show dependency tree
 
Reported: 2008-02-15 20:16 UTC by jon_forums
Modified: 2008-09-06 05:26 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 jon_forums 2008-02-15 20:16:21 UTC
OS: Win2K w/SP4 and WinXP v5.1 (XP Home) w/SP2
CPU: P3-M 600MHz and P4-M 1.86GHz
Memory: 384MB and 512MB
JRE: Sun 1.6.0_04
Netbeans: 6.0 (Build 200711261600) with all updates
Not connected to the Internet

Steps to reproduce
==================
Ensure that the system is not connected to the Internet.  After adding a local schema via Tools->DTDs and Schemas to the
User Catalog, create a simple XML instance document containing the following.  Note that the System ID used to point to
the local "spring-beans-2.5.xsd" file is "http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" (with
"http://www.springframework.org/schema/beans" also tried)

<?xml version="1.0" encoding="UTF-8"?>

<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
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

</beans>

Now attempt to add any XML child element such as <bean/>.  Code completion does not work for any elements defined in the
schema and in the Output window the following error is created:

Retrieving Location: http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
Error: Unknown Host: www.springframework.org
URL Resource

The following items work correctly:

1) Tools->DTD and XML Schemas->Open in Editor will bring up the XSD in an editor window
2) Validate XML (ALT+SHIFT+F9) validates the instance document 

see nbusers mailing list issue for discussion:
http://www.nabble.com/NB6---code-completion-for-local-schema-problems-td15460208.html
Comment 1 jon_forums 2008-02-26 02:41:52 UTC
Tried with the same setup in 200802251204 and while offline CC works for the main Spring XSD's as these live in a Spring
Framework Catalog (great,thanks!!), adding a local XSD to the User Catalog still fails to work with offline CC as
previously described.

Attempted to use the following XML configuration file after adding the system ID
"http://www.springframework.org/schema/integration/spring-integration-1.0.xsd" and corresponding local file to the
Tools->DTD and XML Schemas dialog:


<?xml version="1.0" encoding="UTF-8"?>

<beans:beans xmlns:si="http://www.springframework.org/schema/integration"
       xmlns:beans="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context-2.5.xsd
                           http://www.springframework.org/schema/integration
                           http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
   
    <si:message-bus />
    <si:annotation-driven />
    
    <si:channel id="inputFiles" />
    
</beans:beans> 
Comment 2 Samaresh Panda 2008-08-05 07:14:28 UTC
*** Issue 142126 has been marked as a duplicate of this issue. ***
Comment 3 Samaresh Panda 2008-09-05 23:36:34 UTC
Fixed: http://hg.netbeans.org/main?cmd=changeset;node=10d0060f6c19.
Comment 4 Quality Engineering 2008-09-06 05:26:23 UTC
Integrated into 'main-golden', will be available in build *200809060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/10d0060f6c19
User: samaresh@netbeans.org
Log: #127514 Code Completion not working with local schema in User Catalog