XML Catalog is not seeing by project

503 Views Asked by At

Im using in my application "catalog.xml" file which consider:

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

    <public
        publicId="-//OpenSymphony//SiteMesh 1.5 Decorators//EN"
        uri="platform:/resource/mgb/src/main/webapp/WEB-INF/sitemesh_1_5_decorators.dtd" />

    <system
        systemId="sitemesh_1_5_decorators.dtd"
        uri="platform:/resource/mgb/src/main/webapp/WEB-INF/sitemesh_1_5_decorators.dtd" />

</catalog>

In some xml file i use DOCTYPE like below:

<!DOCTYPE decorators SYSTEM "sitemesh_1_5_decorators.dtd">

or

<!DOCTYPE decorators PUBLIC "-//OpenSymphony//SiteMesh 1.5 Decorators//EN" "sitemesh_1_5_decorators.dtd">

or even (of course catalog.xml has another systemid)

<!DOCTYPE decorators PUBLIC "-//OpenSymphony//SiteMesh 1.5 Decorators//EN" "http://www.opensymphony.com/sitemesh/dtd/sitemesh_1_5_decorators.dtd">

Nothing from this is seems to work. I imported this file to project, add everything to Window>Preferences>XML Catalog. Even in xml file i see possibility to use this values in DOCTYPE. Unfortunatelly when im launching project without net connection i got error that i cannot download this files. Am i missing something? This is mvc project.

1

There are 1 best solutions below

2
On

From http://www.xmlsoft.org/catalog.html

The user can change the default catalog behaviour by redirecting queries to its own set of catalogs. This can be done by setting the XML_CATALOG_FILES environment variable to a list of catalogs, an empty one should deactivate loading the default /etc/xml/catalog default catalog.

So try putting the catalog files in /etc/xml/catalog (even on Windows) or set/change the variable.