Hi,
after reading https://docs.basex.org/wiki/Catalog_Resolver and digging in the list archives (https://mailman.uni-konstanz.de/pipermail/basex-talk/2019-March/014199.html ) I still have trouble understanding catalog files.
Is this supposed to work with xslt:transform() and BaseX GUI 9.7.2? The default option (DTD = false) is ignored by xslt:transform() because the function is definitely requesting the external DTD. This prevents transforming XML with DTD declarations that are not available (if I understand correctly, a problem that the DTD option is trying to solve in general).
When I try to solve this via catalog files (actually I do not need the DTD), I do not have success. Here are my mini examples:
Saxon HE 10.3 resides in the lib folder
.basex setting: # Local Options SERIALIZER = indent=no DTD = true
XML in local folder "C:/temp/catalog": <!DOCTYPE dokument SYSTEM "http://www.blahblahblah.info/dtd/dokument.dtd"> <dokument> <doknr>01</doknr> </dokument>
catalog.xml in local folder "C:/temp/catalog": <catalog prefer="system" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteSystem systemIdStartString="http://www.blahblahblah.info/dtd/" rewritePrefix="file:///C:/temp/catalog/dtd/"/> </catalog>
dokument.dtd in local folder "C:/temp/catalog/dtd": <!ELEMENT dokument (doknr)> <!ELEMENT doknr (#PCDATA)>
XQuery query.xq in local folder "C:/temp/catalog": (# db:catfile catalog.xml #) { xslt:transform('dokument.xml', 'transform.xsl') }
With or without pragma, this always results in a java.net.UnknownHostException (because the system ID is not available, that's true), but I would be expecting this would resolve to "file:///C:/temp/catalog/dtd/dokument.dtd"
Not working in GUI nor via CCL.
What am I getting wrong?
Thanks, Daniel