expath-file:base-name

Gets the last component of a file name.

base-name($file as xs:string) ➔ xs:string

Arguments

 

$file

xs:string

The file name (path)

Result

xs:string

base-name($file as xs:string, $suffix as xs:string) ➔ xs:string

Arguments

 

$file

xs:string

The file name (path)

 

$suffix

xs:string

A suffix to be trimmed from the result

Result

xs:string

Details

Namespace: http://expath.org/ns/file

Notes on the Saxon implementation

Implemented since Saxon 9.5; available whether or not support for XPath 3.0 is enabled