[MarkLogic Dev General] xml file existence

Eric Palmitesta eric.palmitesta at utoronto.ca
Thu Sep 4 08:02:20 PDT 2008


Hi all,

Is there a function to determine if an xml file exists within the ML 
database?  I thought it would be xdmp:uri-is-file, but as far as I can 
tell this checks for the existence of a file on the application server 
(not IN the database).  I can't find a native function to check this, 
currently I'm doing:

define function util:uri-exists($uri as xs:string)
as xs:boolean
{
	fn:exists(fn:doc($uri))
}

Is there a better way?

Cheers,

Eric


More information about the General mailing list