You mean something like the following?
"<a href='http://server/somefolder/yourapplication.nsf/thexpage.xsp?databaseName=server!!somefolder\yourapplication.nsf&documentId=QPLAKSJF14619HSFK&action=openDocument'>here</a>"
Where,
server = common name of your server
somefolder/yourapplication.nsf = the path to your database relative to the domino server data folder
thexpage = the XPage you want to use to open your document
server = same as before
somefolder\yourapplication.nsf = same as before but change any backslash to forward slash
QPLAKSJF14619HSFK = universal ID of the document