Hi Ashwini, You are alllowed to mix xquery dialects, which will give you access to the fn:distinct-nodes() function. Basically, you can write a library module in the "0.9-ml" dialect, that includes a function using fn:distinct-nodes(), and import that for use in your "1.0-ml" module. Just remember to include the xquery dialect version in your prolog (always good practice). For further details, this is documented in the XQuery Ref Guide, as follows:
http://developer.marklogic.com/pubs/4.1/books/xquery.pdf 2.2 Rules For Combining the Dialects MarkLogic Server has a very flexible way of combining the three XQuery dialects. You can import a library module written in any of the three dialects into any main or library module. For example, you might find an open source standards-compliant module that you found on the internet which is written in the strict XQuery 1.0 dialect. You can then import this module into any MarkLogic Server XQuery program, regardless of dialect, and then use those functions in your code. When writing modules of different dialects, the best practice is to always use the XQuery version declaration as the first line, indicating which dialect the module is written in. That way, if the module is written in a different dialect than the default dialect for the App Server or the program, it will still work correctly (for details, see “Inheriting the Default XQuery Version From the App Server” on page 11). NOTE: One other thing to mention, in "0.9-ml" there's a subtle difference in the dialect, namespace declarations and imports - no semicolons are used at the end of the declaration, as there is in "1.0-ml". Regards, Jason ________________________________________ From: [email protected] [[email protected]] On Behalf Of Ashwini [[email protected]] Sent: Wednesday, November 25, 2009 8:32 AM To: [email protected] Subject: [MarkLogic Dev General] distinct-nodes() in marklogic 4.1-2 hi all, i saw fn:distinct-nodes() function in xquery "0.9-ml" but i want these kind of functionality in xquery "1.0-ml"; can any one help me to find a way for finding distinct nodes in marklogic 4.1-2 thanks alot in andvance. _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
