We stumbled upon occasional "hiccups" when updating modules in module
databases, and have the suspicion that this might be related to the
module caching, and the use of the file extension "xqm" (for XQuery
Module, as developed by The W3C XML Query Working Group).

In the section "Module Caching Notes"[2] of "Importing XQuery Modules,
XSLT Stylesheets, and Resolving Paths" the explanations do not refer
to the format of the document (or rather, module) but always use odd
phrases such as:
- "file extension for a module corresponding to
application/vnd.marklogic-xdmp or application/xslt+xml mimetypes",
- "mimetype extension corresponding to application/vnd.marklogic-xdmp
or application/xslt+xml",
- "a module that does not have the correct extension", and so on.
Also that section suggests to "add other extensions to these mimetypes
using the mimetypes configuration in the Admin Interface" to avoid
problems with the (automatic) module caching.

This gives us the impression, that for the module caching the
document's MIME type is actually not obeyed, but that this part always
relies on the fact that the file extensions should match entries in
the "mimetypes configuration".

Is this assumption / interpretation correct?

Also, from our tests we deduct that MarkLogic actually doesn't store
the MIME type (but just uses it to map to a document format (i.e.,
xml, text, binary, or json)).

The core question is: how do we ensure that the cache works as
expected. Is it best practice to specify MIME types (when uploading
using the REST interface), or does the file extension (together with
the "mimetypes configuration") take precedence over the explicit MIME

Thanks in advance,

1) https://docs.marklogic.com/guide/ingestion/formats#id_39990
2) https://docs.marklogic.com/guide/app-dev/import_modules#id_79417

Max-Gerd Retzlaff
General mailing list
Manage your subscription at: 

Reply via email to