[MarkLogic Dev General] Links to Images in XML

Asheesh Mangla asheesh at marklogic.com
Mon Feb 12 00:02:10 PST 2007


Richa,

Running a doc on an image will return the binary file. Are you using
xquery for presentation layer? 

if you are using xquery for presentation layer, then you could send an
instruction to browser to fetch image using the image/src tag which
point to a simple xquery and passes uri (see attached). A simple example
is below:

<html>
<body>
This is a link an image <image src="/get-file.xqy?uri={$uri}"/>
</body>
</html>

If you have an application based presentation layer (jsp/asp etc), then
you would need a jsp page instead of xqy which would server the image,
however you would need to call a function via using XCC and fetch a
binary doc/return it.

-asheesh





-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Richa
Gupta ,Gurgaon
Sent: Sunday, February 11, 2007 8:13 PM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] Links to Images in XML


Hi,

We have links to certain images in our XML files. 
Through querying I want these images to be displayed on the page. How to
achieve the same using XQuery?

Any suggestion will be helpful.

Regards,


DISCLAIMER:
------------------------------------------------------------------------
-----------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of 
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

------------------------------------------------------------------------
-----------------------------------------------
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get-file.xqy
Type: application/octet-stream
Size: 63 bytes
Desc: get-file.xqy
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20070212/671ccbb4/get-file.obj


More information about the General mailing list