aspose file tools*
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Schema catalogs