Rahul, one additional suggestion: Although fn:base-uri will typically return the desired result, it's safer to use the MarkLogic function xdmp:node-uri. The difference is that fn:base-uri returns the base-uri of the node to which the document belongs, which can actually be defined in the document to any arbitrary URI, and not necessarily the URI of the document, whereas xdmp:node-uri will always give you the URI of the document in which the node exists.
Aaron ________________________________ From: [email protected] [[email protected]] On Behalf Of Rahul Saluja [[email protected]] Sent: Monday, October 12, 2009 7:51 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] how to find uri of a document associated with node Hi All, Thank you for your responses i just found that i have got what i have been looking for its just that the element which is been returned by my query can its self be used as an arguement to fn:base-uri($arg as node()?) as xs:anyURI . cheers On Mon, Oct 12, 2009 at 5:13 PM, Lee, David <[email protected]<mailto:[email protected]>> wrote: an element is a node. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Rahul Saluja Sent: Monday, October 12, 2009 7:43 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] how to find uri of a document associated with node well if my function returns an element then how can i use that element to get node, i am sorry if i am asking silly question, as i have noot been very much into xml lately. regards Rahul On Mon, Oct 12, 2009 at 5:11 PM, Lee, David <[email protected]<mailto:[email protected]>> wrote: fn:base-uri($arg as node()?) as xs:anyURI? might do the trick http://www.w3.org/TR/xpath-functions/#func-base-uri From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Rahul Saluja Sent: Monday, October 12, 2009 7:33 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] how to find uri of a document associated with node Hi Frank, Appreciate your quick response, and is there any api using which we can find node associated with particular element. On Mon, Oct 12, 2009 at 4:52 PM, Frank Sanders <[email protected]<mailto:[email protected]>> wrote: Rahul, You can try either of the below, one of them should give you what you’re looking for. http://developer.marklogic.com/pubs/4.1/apidocs/AccessorBuiltins.html#fn:base-uri http://developer.marklogic.com/pubs/4.1/apidocs/Ext-6.html#xdmp:node-uri -fs From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Rahul Saluja Sent: Monday, October 12, 2009 12:20 PM To: [email protected]<mailto:[email protected]> Subject: [MarkLogic Dev General] how to find uri of a document associated with node Helo all, is there any api available using which i can find the uri of a document from the node returned back from my search application. Regards Rahul Saluja _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://xqzone.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
