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 35880 - No declarative registration of system IDs in EntityCatalog
Summary: No declarative registration of system IDs in EntityCatalog
Status: RESOLVED DUPLICATE of bug 192595
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@platform
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-09-03 00:47 UTC by Chris Webster
Modified: 2011-03-02 17:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Webster 2003-09-03 00:47:34 UTC
org.openide.xml.EntityCatalog describes a
mechanism for registering DTD schemas but not how
to register xml schemas.
Comment 1 Jesse Glick 2003-09-03 16:52:37 UTC
EntityCatalog does not care about DTDs vs. XML Schema. It supplies a
way to declaratively register entities based on public ID (they need
not be DTDs). Currently it does not supply a declarative registration
method for entities based on system ID (as nothing in NetBeans
requires this). You are free to register an instance of EntityCatalog
to the default lookup which can resolve entities based on system ID
(generally, acc. to the contract of EntityResolver). Therefore this is
an RFE (and not one I see any reason to implement currently, if ever).

Note that EntityCatalog is primarily used to register entities that
would be used internally in NetBeans, such as DTDs for settings files
in the system filesystem. In the case of DTDs, this is really
necessary, since even with validation disabled the presence of a
<!DOCTYPE> declaration forces the parser to load the external DTD
entity. Therefore in order to parse such files, even without
validation, you need to register the DTDs in EntityCatalog to avoid
attempted network connections. For XML Schema there is no such
justification since a namespaced XML document can be parsed with no
special provisions; it is only if you explicitly wish to run schema
validation that you need a way to supply a local copy of the schema.
(Even then, you only need to use something like EntityCatalog if you
know nothing about the document and are relying on a mapping from its
declared default schema location to a local cache; a schema-aware
parser like Xerces will in fact permit you to supply an explicit local
schema URL or a mapping from namespace to schema URL, which is
sufficient if you know the intended schema for the document.)

If your primary interest is in providing schemas for use with
user-driven validation of user documents, such as deployment
descriptors etc., then you should not be using EntityCatalog anyway.
The xml/catalog module provides a documented SPI for registering XML
catalogs which will be consulted e.g. by the Validate XML action and
which can be browsed and customized in the GUI.
Comment 2 Jesse Glick 2011-03-02 17:37:58 UTC

*** This bug has been marked as a duplicate of bug 192595 ***