dear all i did it let $str := "book/title/author" let $p:=string-join(subsequence(tokenize("book/title/author", "/"), 1, count(tokenize($str, "/")) - 1), "/") return $p __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com