Got it, thnx its working. ~Gurbeer From: [email protected] [mailto:[email protected]] On Behalf Of Singh, Gurbeer (Enterprise Data & Services) Sent: Wednesday, November 20, 2013 7:04 PM To: '[email protected]' Subject: Re: [MarkLogic Dev General] Issue with xdmp:unquote if passing & Unexpected end of file at line 1
You mean in xqy file. From: Ryan Dew [mailto:[email protected]] Sent: Wednesday, November 20, 2013 06:30 PM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] Issue with xdmp:unquote if passing & Unexpected end of file at line 1 So it seems like it is an issue in the transfer to the page. Have you tried placing the content in the request body. You can even set the type as 'application/xml' and you won't even have to use xdmp:unquote. (: submission :) let $options := <options xmlns="xdmp:http"> <headers> <content-type>application/xml</content-type> </headers> <data>{xdmp:quote($document)}</data> </options> return xdmp:http-post($searchUri, $options) (: reception :) declare variable $newdivisions := xdmp:get-request-body()/fwp:divisions; $newdivisions -Ryan Dew On Wed, Nov 20, 2013 at 4:20 PM, Singh, Gurbeer <[email protected]<mailto:[email protected]>> wrote: xdmp:unquote I am passing below string in Query string and in XQY file we are trying to read like this STRING <fwp:divisions xmlns:fwp='http://morganstanley.com/firmwidePolicy'> <fwp:bucket xmlns:fwp='http://morganstanley.com/firmwidePolicy' name='Technology Data'> <fwp:buArea xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='0' tag='true' ><![CDATA[Technology Data]]></fwp:buArea> <fwp:bu xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='1' tag='false' ><![CDATA[Quality Assurance & Prod Mgmt]]></fwp:bu> <fwp:bu xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='2' tag='true' ><![CDATA[CPT CRGT QA]]></fwp:bu> </fwp:bucket></fwp:divisions> let $newdivisions := xdmp:get-request-field("division", "") running on below query I am getting err xdmp:node-replace($doc//fwp:divisions,xdmp:unquote($newdivisions)/fwp:divisions) XDMP-DOCUNEOF: xdmp:unquote("<fwp:divisions xmlns:fwp='http://morganstanley.com/firmwidePolic...") -- Unexpected end of file at line 1 (cdata starting at line 1) If I am running above in CQ its working fine, declare namespace fwp="http://morganstanley.com/firmwidePolicy"; let $newdivisions :="<fwp:divisions xmlns:fwp='http://morganstanley.com/firmwidePolicy'> <fwp:bucket xmlns:fwp='http://morganstanley.com/firmwidePolicy' name='Technology Data'> <fwp:buArea xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='0' tag='true' ><![CDATA[Technology Data]]></fwp:buArea> <fwp:bu xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='1' tag='false' ><![CDATA[Quality Assurance & Prod Mgmt]]></fwp:bu> <fwp:bu xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='2' tag='true' ><![CDATA[CPT CRGT QA]]></fwp:bu> </fwp:bucket></fwp:divisions> " return xdmp:unquote($newdivisions) My Service string is http://vi5tas01.ms.com:40001/services/ML_Migration.xqy?id=1431180&contentType=<contentType><![CDATA[Procedure]]></contentType>&documentType=<fwp:documentType xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='0' tag='true' ><![CDATA[Procedures]]></fwp:documentType>&documentType2=<fwp:documentType2 xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='0' tag='true' ><![CDATA[Procedure]]></fwp:documentType2>&division=<fwp:divisions xmlns:fwp='http://morganstanley.com/firmwidePolicy'><fwp:bucket xmlns:fwp='http://morganstanley.com/firmwidePolicy' name='Technology Data'><fwp:buArea xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='0' tag='true' ><![CDATA[Technology Data]]></fwp:buArea><fwp:bu xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='1' tag='false' ><![CDATA[Quality Assurance & Prod Mgmt]]></fwp:bu><fwp:bu xmlns:fwp='http://morganstanley.com/firmwidePolicy' level='2' tag='true' ><![CDATA[CPT CRGT QA]]></fwp:bu></fwp:bucket></fwp:divisions>&newElementKB=<fwp:groupName xmlns:fwp='http://morganstanley.com/firmwidePolicy'>Technology Risk</fwp:groupName>&newElementWF=<fwp:workflowName xmlns:fwp='http://morganstanley.com/firmwidePolicy'> </fwp:workflowName> ________________________________ NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing. _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general ________________________________ NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing. ________________________________ NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
