On 05.11.2021 03:03, Liam R. E. Quin wrote:
On Thu, 2021-11-04 at 18:43 -0400, Graydon Saunders wrote:
Related to this, setting the catalog for use by xslt:transform() is defeating me.
The only ways i have found to debug these are (1) with strace -f, to make sure the file is being read (2) with a CatalogManager.properties file [[ verbosity=65535 # relative-catalogs=false prefer = public catalogs=mycataloguefile.xml ]]
Likely you need entries in the catalog file starting with file:///
If you are uploading queries to a BaseX server, remember it's the server that needs to have had XLASSPATH set when starting, and that relativeURIs like "catalog.xml" might be sought for in the server's directory.
Liam
Liam and Christian have thankfully added support for resolving include/import URIs and doc(…) URIs approx 2 years ago [1]. A thing that I recently found was lacking is resolution of system identifiers that occur in documents. That is, if there is a reference to a DTD in a document that is read during the transformation, the catalog resolution does not apply to the public or system identifiers.
Is this the issue that you are encountering, Graydon?
Your first argument to xslt:transform is db:open('acme_content')[1]. Does this document have a DOCTYPE declaration? I’d have guessed that the DOCTYPE declaration was stripped away when the documents were loaded into the DB, that is, parsing with the DTD only happened during import. But maybe this is different if you use the internal parser.
Gerrit