Hi Vidya, Just write & instead of &, the Xquery parser will collapse it to the & character in memory.
Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of vidya kv > Sent: donderdag 17 september 2009 12:30 > To: [email protected] > Subject: [MarkLogic Dev General] & problem in xquery > > Please find the below query: > > let $tmp := "&c" > let $qury := fn:concat( "cts:search(doc(", > """","abc.xml","""",")/a/b,","""",$tmp,"""",")" ) return > xdmp:eval($qury) > > where "abc.xml" is : > xdmp:document-insert("abc.xml",ab &c C) > > This give me the following error . > Invalid entity reference "c" > > I am looking for a solution where $tmp in the above can have > value &c or C And i am supposed to get the result ab &c C . > It will be really useful if some one can guide me on, what > unique replacement & requires so that the above query will > work for both &c and C values of $tmp > > > <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.redif > fmail.com/signatureline....@middle?> > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
