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 229308 - xml schema downloaded repeatedly
Summary: xml schema downloaded repeatedly
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Schema (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 08:27 UTC by mvy
Modified: 2013-05-10 07:49 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
IDE log (177.13 KB, text/plain)
2013-05-03 08:28 UTC, mvy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvy 2013-05-03 08:27:55 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.8.0-19-generic running on i386
Java; VM; Vendor = 1.7.0_21
Runtime = OpenJDK Client VM 23.7-b01

Good day. I am editing a docbook xml file with the following header:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % CustomDTD SYSTEM "../custom.dtd">
%CustomDTD; 
]>
<chapter id="cluster">
...
</chapter>

The entity file is present in the filesystem and contains simple entities only, such as:

<!-- General entities -->
<!ENTITY Home "http://www.innovatrics.com/afismq/">

Each time I start Netbeans, the Docbook schema is obviously being downloaded from an internet, because the "please wait" popup is shown for quite a long time for the first auto-completion performed.
When the DTD is downloaded, Netbeans works correctly and quickly provides correct auto-completion.
Comment 1 mvy 2013-05-03 08:28:01 UTC
Created attachment 134074 [details]
IDE log
Comment 2 Svata Dedic 2013-05-09 14:51:46 UTC
ACK; the DTD grammar code was not designed with the option of local caching -> turning into an enhancement with a higher priority.

The code fails to attach lexical handler and parses the user document, which causes JAXP implementation itself to connect to the Internet for the DTD.

You can work-around the situation if you manually add the docbookx.dtd into your Tools | DTDs and XML Schemas - the builtin Entity Resolver should then supply JAXP with the local copy of the DTD. No automatic download is done for you, though.