[MarkLogic Dev General] xdmp:directory() with position predicate

Gary Larsen gary.larsen at envisn.com
Fri Oct 25 06:49:38 PDT 2013


That was it!  Thanks Eric.  

 

Gary 

 

From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Erik Hennum
Sent: Friday, October 25, 2013 9:28 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] xdmp:directory() with position
predicate

 

Hi, Gary: 

 

The XPath selects the first document in the directory and then selects the
root element named promoAudit.

 

Is it possible that the first document doesn't have that root element?

 

Are you interested in selecting the first root element?  If so, the
predicate should follow the root element:

 

(xdmp:directory('/db/audit/','infinity')/promoAudit)[1]

 

 

 

Erik Hennum

  _____  

From: general-bounces at developer.marklogic.com
[general-bounces at developer.marklogic.com] on behalf of Gary Larsen
[gary.larsen at envisn.com]
Sent: Friday, October 25, 2013 6:01 AM
To: 'General MarkLogic Developer Discussion'
Subject: [MarkLogic Dev General] xdmp:directory() with position predicate

Probably missing something simple but the position predicate doesn't seem to
work with xdmp:directory().

 

This query returns many documents:

 

xdmp:directory('/db/audit/','infinity')/promoAudit

 

But this returns an empty sequence:

 

xdmp:directory('/db/audit/','infinity')[1]/promoAudit

 

Thanks for any help,

Gary 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20131025/bed026a6/attachment.html 


More information about the General mailing list