MarkLogic 10 Product Documentation
cvt:basename

cvt:basename(
   $uri as xs:string
) as xs:string

Summary

Return the filename part of the URI, cutting off any query strings or fragments.

Parameters
uri The URI to manipulate.

Example

  xquery version "1.0-ml";
  import module namespace cvt = "http://marklogic.com/cpf/convert" 
		  at "/MarkLogic/conversion/convert.xqy";

  cvt:basename( "http://example.com/a.path/myfile.doc" ) 
     
  => "myfile.doc"
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy