Gary, The full URI is really the document name. If you want the last bit of the URI after the final "/" you can use
tokenize("/a/b/c/d.x", "/")[last()] if you want the path after your directory, use substring-after($uri, $dirname) Yours, Damon From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Gary Larsen Sent: Friday, June 03, 2011 11:06 AM To: 'General MarkLogic Developer Discussion' Subject: [MarkLogic Dev General] document name function If there an xQuery function to return the document name? fn:document-uri(xdmp:directory('/db/netvisn/global/analysis/result/', 'infinity')) returns /db/netvisn/global/analysis/result/98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml But what I need is 98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml Thanks, gary
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general