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 &amp; 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 &amp; 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 &amp; 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]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to