Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Gary Larsen
Dev General] document name function At 2011-06-03 12:11 -0400, you wrote: >The regex solution worked great! I'm glad! But I like Damon's suggestion of using tokenize() better: At 2011-06-03 08:08 -0700, Damon Feldman wrote: >If you want the last bit of the URI after the final

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Keith L. Breinholt
boun...@developer.marklogic.com] On Behalf Of Gary Larsen Sent: Friday, June 03, 2011 10:12 AM To: 'General MarkLogic Developer Discussion' Subject: Re: [MarkLogic Dev General] document name function The regex solution worked great! Thanks -Original Message- From:

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread G. Ken Holman
At 2011-06-03 12:11 -0400, you wrote: >The regex solution worked great! I'm glad! But I like Damon's suggestion of using tokenize() better: At 2011-06-03 08:08 -0700, Damon Feldman wrote: >If you want the last bit of the URI after the final "/" you can use > >tokenize("/a/b/c/d.x", "/")[last()]

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Gary Larsen
General] document name function At 2011-06-03 11:05 -0400, Gary Larsen wrote: >If there an xQuery function to return the document name? > >fn:document-uri(xdmp:directory('/db/netvisn/global/analysis/result/', >'infinity')) > >returns > >/db/netvisn/gl

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Damon Feldman
oun...@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 re

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread G. Ken Holman
At 2011-06-03 11:05 -0400, Gary Larsen wrote: >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 nee

[MarkLogic Dev General] document name function

2011-06-03 Thread Gary Larsen
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-4afe65fb9e