Search code examples
xsltxquerymarklogic

MarkLogic: where should I place the XSLT code when testing xdmp:xslt-invoke in the qconsole


I have tried adding it to the database associated with the query that's being run, in the folder of the qconsole itself and in the Modules db, but I still get the error message: "File open error: open '/to-html.xsl': No such file or directory"

This is the code I'm trying to run: xdmp:xslt-invoke("to-html.xsl", fn:doc('/docs/before-1.xml'))


Solution

  • Generally, the path given to xdmp:xslt-invoke will resolve relative to your modules root. But there is a more complex set of rules about the order MarkLogic will use when evaluating paths explained in the documentation:

    https://docs.marklogic.com/guide/app-dev/import_modules#id_29407