Hi Deekshant
I don't know if this will meet the requirement of getting the uris that
does not have date-field2 elements. The query below is returning me all
the uris irrespective of date-field2 element is present or not.
cts:uri-match("/content/*.xml", "any",
cts:not-query(cts:element-value-query(xs:QName("as-project-bid-date"),'*',"wildcarded"))
)
Thanks for reply
Abhishek Srivastav
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
From:
deekshant belwal <[email protected]>
To:
General MarkLogic Developer Discussion <[email protected]>
Date:
08/16/2011 11:05 PM
Subject:
Re: [MarkLogic Dev General] Get uris for element does not exists
Sent by:
[email protected]
Hi Abhishek,
try this
cts:not-query(cts:element-value-query(xs:QName("date-field2"),'*',"wildcarded"))
- Deekshant
On Tue, Aug 16, 2011 at 10:32 PM, Abhishek53 S <[email protected]>
wrote:
Hi Folks
I need to find out the URIs which is matching the following criteria.
1. The value of date-field1 is greater than sysdate - 30
AND
2. The element date-field2 does not exists
I can write the query for date-field2 exists. which is more or less given
below
cts:uri-match("/root/*.xml", "any",
cts:and-query((
cts:element-range-query(
xs:QName("date-field1"),">",
fn:current-date() - xs:dayTimeDuration("P30D")),
cts:element-query(xs:QName('date-field2'),cts:and-query(()))
))
)
but unable to find any way to do the same for scenario "date-field2 does
not exists".
Thanks in advance
Abhishek Srivastav
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general