Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
220 views
in Technique[技术] by (71.8m points)

MarkLogic TDE doesn't support xdmp:uri-content-type or xdmp:uri-format as transformation functions?

I am a little surprised that xdmp:uri-content-type and xdmp:uri-format are not supported as transformation functions in MarkLogic TDE (template-driven extraction) template.

[javascript] TDE-EVALFAILED: tde.nodeDataExtract(...) -- Eval for $doc-format='xdmp:uri-content-type($doc-uri)' returns XDMP-UNDFUN: (err:XPST0017) Undefined function xdmp:uri-content-type()

Indeed the two are not listed as acceptable functions in the documentation: https://docs.marklogic.com/10.0/guide/app-dev/TDE#id_99178

Just want to confirm if it is the case and also I am curious about the rationale.

question from:https://stackoverflow.com/questions/65557887/marklogic-tde-doesnt-support-xdmpuri-content-type-or-xdmpuri-format-as-transf

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

These functions require access to mimetype settings inside MarkLogic configuration, which is probably the reason why they are unavailable. To get something similar to format based on a node or document at hand, use xdmp:node-kind instead. Content-type will need to be calculated upfront unfortunately, during ingest.

HTH!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...