Thanks a lot for the reply.
I see, there is quit a better why than mine. In meantime i programmed a function:
declare namespace functx = "...";
declare function functx:index-of-string
( $arg as xs:string? ,
$substring as xs:string ) as xs:integer* {
if (contains($arg, $substring))
then (string-length(substring-before($arg, $substring))+1,
for $other in
functx:index-of-string(substring-after($arg, $substring),
$substring)
return
$other +
string-length(substring-before($arg, $substring)) +
string-length($substring))
else ()
} ;
so I can call the function like:
count(functx:index-of-string($path, '\'))
#Tamino#API-Management#webMethods