Hi Keith
I guess the below givent query will help you .
I guess the below givent query will help you .
xquery version "1.0-ml";
import module namespace search = "http://marklogic.com/appservices/search"
at "/MarkLogic/appservices/search/search.xqy";
search:search("kolkata",
<options xmlns="http://marklogic.com/appservices/search">
<searchable-_expression_>/element()[@lang = "eng"]</searchable-_expression_>
</options>)
Regards
Abhishek Srivastav
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: abhishek5...@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
To: general@developer.marklogic.com
From: Keith Breinholt <lisph...@gmail.com>
Sent by: general-boun...@developer.marklogic.com
Date: 08/20/2011 01:17AM
Subject: [MarkLogic Dev General] How to query a attribute of a generic node...
I want to display a set of documents that have a common attribute on the root node. However, the root nodes of the documents can have any tag name such as <html>, <xml>, ...
I can do this easily with XPath similar to this
element()/@lang[. eq 'eng']
However, I'd like to use search:search for pagination and sorting of results. The problem is I don't know a way to specify a generic parent for an attribute in a cts query.
Any ideas or help is very appreciated.
--
Keith
"Do what you can, with what you have, where you are." - Theodore Roosevelt
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general
=====-----=====-----=====
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 General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general