temporal.documentDelete( temporal-collection as String, uri as String, [options as Object?] ) as null
This function deletes the temporal document identified by the given URI. Note that temporal documents are not actually deleted, but are rather "logically deleted" and remain in the database with system end times set to the time of the deletion.
declareUpdate(); const temporal = require('/MarkLogic/temporal.xqy'); temporal.documentDelete('temporalCollection', 'doc.xml') // Deletes the 'doc.xml' document from the temporalCollection.
declareUpdate(); var temporal = require("/MarkLogic/temporal.xqy"); temporal.documentDelete("temporalCollection", "doc.xml", {ifNotExists:"allow"}) // Deletes the "doc.xml" document from the temporalCollection if it exists.