That was it!  Thanks Eric.  

 

Gary 

 

From: [email protected]
[mailto:[email protected]] 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: [email protected]
[[email protected]] on behalf of Gary Larsen
[[email protected]]
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 

 

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to