wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes XML Schema catalogs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Schema catalogs" Watch "XML Schema catalogs" New topic
Author

XML Schema catalogs

michael shea
Greenhorn

Joined: Nov 11, 2001
Posts: 9
Guys,
I'm having problems using an XML catalog with the Xerces 2 parser. Here is the code that I used to add an entity resolver:

I am using version 1.1 of Sun's Resolver package.
The code listed above compiles OK. The following is the CatalogManager.properties file:

When running my program it reads in the catalog correctly, as shown in the following output:

This is the catalog.xml files contents:

The following is the error message that gets return after running the parser:

Each time the error occurs, the entity resolver tries to resolve the following:

I don't know why it adds the base directories to the name of the schema file as I have explicitly told the entity resolver to not use absolute locations.
Lastly, here is a sample of the xml file which contains the "lookup name" for the xml catalog to look up:

As you can see, the xml file only references SchemaFile.xsd, and the entity resolver at runtime should lookup that name in the catalog and substitute file:///home/acct/mshea/generated/schema/SchemaFile.xsd for it, but it does not.
Any help would be appreciated and if I'm doing this the wrong way, then I'd definately want to nkow about it.
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: XML Schema catalogs
 
Similar Threads
SAX XSD Validation. Error callback is called twice.
Validating xml against xsd using dom
Create XML DOM with schema
Error during Maven "Clean & Build" of project
Parse/Validate with DSIG schema issue