How do I use uriSuffix/systemSuffix with XML catalogs?

S

Secret Guy

I am using xml-commons-resolver-1.1 with java. I want to resolve
relative URIs, e.g.:

test

or in XSLT: document('test')

I have a catalog:

<?xml version="1.0"?>
<catalog
xmlns="urn:eek:asis:names:tc:entity:xmlns:xml:catalog"
xmlns:ext="http://nwalsh.com/xcatalog/1.0"
prefer="public">

<ext:systemSuffix suffix="test uri="data/test.xml"/>

</catalog>

If I use the resolver app:

java resolver -d 10 -c catalog.xml test system

the result is:

Cannot find CatalogManager.properties
Parse catalog: ./xcatalog
Loading catalog: ./xcatalog
Default BASE: file:D:/projects/ex1/xcatalog
Catalog does not exist: file:D:/projects/ex1/xcatalog
Parse catalog: catalog.xml
Loading catalog: catalog.xml
Default BASE: file:D:/projects/ex1/catalog.xml
override: yes
OVERRIDE: yes
Resolve SYSTEM (systemid):
system id: test
resolveSystem(test)
Result: null

If I change the catalog to use system instead of systemSuffix, it resolves.

Similarly, in java code, if I use CatalogResolver.getResolvedEntity(),
the result is null.

Is there something else that I need to do to get the
ExtendedCatalogResolver to be used?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,251
Members
46,851
Latest member
CristineKo

Latest Threads

Top