Skip to main content

New answers tagged

3 votes
Accepted

marklogic : temporal:document-insert fails

The problem is that the fields are not metadata. To create them use admin:database-metadata-field(): let $config := admin:database-add-field($config, xdmp:database(), admin:database-metadata-field(&...
Marc Messéant's user avatar
Best practices
0 votes
0 replies
0 views

how to replace a string within a text with the contents of a file once or multiple times

This will only work with GNU sed: printf '\0' >> replacementStringFile sed -z 's/[^\n]\'\''/&\n/;s/@{:a}/\x0/g' file | sed -z '/^/r replacementStringFile' | sed -E 'H;1h;$!d;x;s/(.*)\x0.*\x0/...
potong's user avatar
  • 59.4k
Best practices
0 votes
0 replies
0 views

how to replace a string within a text with the contents of a file once or multiple times

The goal is to handle any special chars, including newlines to be inserted. Otherwise the solution is very elegant. Adding ASCII bell to the marker (\a) allows even for multi-line inserts but AIFAK \a ...
user30424's user avatar
  • 271

Top 50 recent answers are included