Dear Team (especially Michael),
I'm trying to use an XML catalog during import (for the first time admittedly), but the catalog is obviously not being used.
I tried to specify a full path in the GUI: c:/cygwin/home/gerrit/Apotheker/BaseX/catalog/catalog-win.xml
I also tried to specify SET CATFILE on the command line, when the server was running and the GUI was off: basexclient -Uadmin -Padmin -c "SET CATFILE catalog/catalog-win.xml; set createfilter *.html; create database amt2; open amt2; add Apotheker/AMT"
Took ages (never finished), which made me think that the resolver wasn't used. Switched off network connection. Received: Error: www.w3.org Since I was trying to import XHTML files, this is an indication that the catalog hasn't been used.
Changed the CATFILE path to Apotheker/BaseX/catalog/catalog-win.xml (because the documents to be imported were apparently considered relative to my home dir or the current dir), to no avail. Also c:/cygwin/home/gerrit/Apotheker/BaseX/catalog/catalog-win.xml didn't work.
Here's the server output: $ basexserver -di BaseX 6.5 [Server] Try "help" to get more information.
Creating Database...
62.02 ms (501 KB) Indexing Text... . 63.36 ms (588 KB) Indexing Attributes... . 66.02 ms (621 KB) Creating Database... java.io.IOException: www.w3.org java.net.PlainSocketImpl.connect(Unknown Source) ...
Created a CatalogManager.properties in the CLASSPATH before starting the server. But it kept trying to connect to www.w3.org.
Current catalog file looks like that:
<?xml version="1.0"?> <catalog prefer="system" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteSystem systemIdStartString="http://www.w3.org/TR/xhtml1/DTD/" rewritePrefix="file:///c:/cygwin/home/gerrit/Apotheker/schema/xhtml1/" /> </catalog>
First HTML file that it is trying to import begins with:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
There is a file xhtml1-strict.dtd in the local directory.
Altering the catalog file so that it's not well-formed any more doesn't seem to impress the parser. So I think it is not being read, but without a warning.
What did I do wrong?
If we manage to solve this, you may want to insert an XML Catalog Howto into the documentation wiki.
Gerrit