On Wed, 2019-03-13 at 11:57 +0100, Christian Grün wrote: > > Note that i have a public identifier, so using prefer-public lets > > that > > be resolved. > > xmllint and BaseX seem to behave differently on my system. With > xmllint and xsltproc, your examples run fine.
That's good at least... > Your example (with the public identifier) returns the expected result > if I replace "nonsense.dtd" with "http://nonsense.dtd". Do you > experience a similar behavior? Io, but i am running the example locally with no http involve, and using the standalone BaseX jar. But i did have to change it to map file: <rewriteSystem systemIdStartString="file:/home/lee/public_html/texts/Dictionaries/Pigo tt-PoliticalDictionary/xml/catalogtest/catalogtestxslt1/nonsense.dtd" rewritePrefix="student.dtd" /> If you add verbosity = 999 to CatalogManager.properties you will see a log of what it is trying to resolve which may help (it also logs all the mapping rules it finds). > In a nutshell: You convinced me well enough that we should simplify > things and handle catalogs globally. :-) Yes, they are a bit of a nightmare. Actually i’ve thought about having the ability to write a URI Resolver in XQuery, db:resolve-identifier($system, $public, $purpose, $types) as xs:anyURI? but maybe it is too scary! > Understanding catalogs is quite a > challenge in itself, and we shouldn’t necessarily make it even more > challenging. I have simplified the code again, so it looks pretty > similar to your original solution ;) i’m sorry - i should have included more background and rationale as to why i did it the way i did, i think. > • If a global catalog file list is defined, it will also be assigned > to the XSL transformer. In fact, that’s the default behavior anyway > if > functions like fn:doc are used in BaseX. Perfect. > • No warnings will be output to standard error, unless > xml.catalog.ignoreMissing is overwritten. Perfect. > > The documentation has been updated, and new snapshots are available. it is all working for me. Many many thanks! Liam -- Liam Quin - web slave for https://www.fromoldbooks.org/ with fabulous vintage art and fascinating texts to read. Click here to have the slave rewarded with cold gruel.