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 40339 - XML Schemas do not map through catalog
Summary: XML Schemas do not map through catalog
Alias: None
Product: xml
Classification: Unclassified
Component: Catalog (show other bugs)
Version: 3.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Milan Kuchtiak
Depends on: 27930
  Show dependency tree
Reported: 2004-02-21 00:31 UTC by alexmilowski
Modified: 2007-09-25 01:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

OASIS Catalog (217 bytes, text/plain)
2004-09-06 18:13 UTC, alexmilowski
Sample Document that should validate (356 bytes, text/plain)
2004-09-06 18:14 UTC, alexmilowski
XML Schema for event.xml (844 bytes, text/plain)
2004-09-06 18:15 UTC, alexmilowski
Sample Driver for Xerces (3.91 KB, text/plain)
2004-09-06 18:16 UTC, alexmilowski

Note You need to log in before you can comment on or make changes to this bug.
Description alexmilowski 2004-02-21 00:31:18 UTC
It seems as though XML Schemas are not using
mounted catalogs at all to find the schema document
associated with a particular namespace.
Comment 1 _ pkuzel 2004-02-25 14:52:40 UTC
Do you use <uri .../> entries to declare this in catalog?
Comment 2 alexmilowski 2004-02-25 16:38:12 UTC
In this case, no I do not use uri as I'm using a urn:publicid:...

This is really a follow-on bug to 40338:

Here's an example.

This document/schema/catalog combination works through Xerces 2.6.2:

The schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd=""

<xsd:element name="event">
<xsd:element name="title" form='qualified' type="xsd:string"/>
<xsd:element name="location" form='qualified' type="xsd:string"/>
<xsd:element name="presenter" form='qualified' type="xsd:string"/>
<xsd:element name="description" form='qualified'>
<xsd:element name="p" form='qualified' type="xsd:string"/>
<xsd:attribute name="start-date" type="xsd:string" use="required"/>


The catalog:
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"


    <public publicId="IDN"


The instance:

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

start-date="4/16/2004" >
<title>Practical RDF</title>
<location>Room 202, South Hall</location>
<presenter>Norm Walsh</presenter>
<description><p>Norm Walsh is coming to talk about pratical
Comment 3 _ pkuzel 2004-02-25 17:27:54 UTC
Petr P, you can take the implementation directly from Xerces (probably
default EntityResolver impl). I hope it's not Xerces specifics
document/schema/catalog combination handling and that a specification
Comment 4 _ pkuzel 2004-02-25 17:37:37 UTC
Alex provided link to spec <>.

It could also address current problems with validating deploment
descriptors described using XML Schema.
Comment 5 Milan Kuchtiak 2004-08-13 09:31:13 UTC
In the issue 45212 are the instructions how to add scheams to XML catalog.

*** This issue has been marked as a duplicate of 45212 ***
Comment 6 dmladek 2004-09-06 16:36:11 UTC
I don't think it is a dup.
Please resolve this issue again without marking this bug as duplicate
of mentioned issue. That issue is hotchpotch of everything.
Comment 7 Milan Kuchtiak 2004-09-06 17:05:04 UTC
For XML validation against XML schema, the systemId should be mapped
to a uri string pointing to the location. The XML Oasis Catalog
template describes how to do that. 
Comment 8 alexmilowski 2004-09-06 18:13:59 UTC
Created attachment 17406 [details]
OASIS Catalog
Comment 9 alexmilowski 2004-09-06 18:14:32 UTC
Created attachment 17407 [details]
Sample Document that should validate
Comment 10 alexmilowski 2004-09-06 18:15:02 UTC
Created attachment 17408 [details]
XML Schema for event.xml
Comment 11 alexmilowski 2004-09-06 18:16:42 UTC
Created attachment 17409 [details]
Sample Driver for Xerces
Comment 12 alexmilowski 2004-09-06 18:19:09 UTC
This schema is not resolved via a system identifier.  It uses a
'public' element in the catalog to resolve the URN of the XML
namespace for the schema.  This does not work inside Netbeans but it
does work outside via Xerces.

If you mount the catalog, it properly shows the mapping of the public
identifier but the validate button on a conforming document says that
it can't find the declaration of the root element.

I have attached sample files and a sample driver for Xerces.
Comment 13 Milan Kuchtiak 2004-09-07 13:06:05 UTC
Thank you very much for the example.
Now I understand what's the problem.
We use the own implementation of entity catalog - that's the problem.
We should switch to the standard Apache resolver-1.1 version (as used
in the example).
This issue is very similar to the issue 48029 and both depend on the
issue 27930.
However I can trach this as a standalone issue.
Comment 14 Milan Kuchtiak 2004-09-13 10:29:05 UTC

The diffs are referenced in issue 48029.
Thank you Alex for your assistance.