Hi Erik,

Can you please help me out in this. There seems to be an issue in custom 
transformation parameter sequence.

Regards,
Gnanaprakash Bodireddy.

From: Bodireddy, Gnanaprakash (Cognizant)
Sent: Thursday, December 27, 2012 11:07 AM
To: general@developer.marklogic.com
Subject: Issue with ML6 XQuery Transformation

Hi

I am facing an issue in using custom XQuery Transformation which I am currently 
using in Rest-API Search

http://<<Host>>:9000/v1/search?q=&options=levelTransformation<http://%3c%3cHost%3e%3e:9000/v1/search?q=&options=levelTransformation>

levelTransformation is configured as below:
<options xmlns="http://marklogic.com/appservices/search";>
<transform-results apply="raw" 
ns="http://marklogic.com/rest-api/transform/levelTransformation"; 
at="/level-transformation.xqy"/>
</options>

Module: /level-transformation.xqy
xquery version "1.0-ml";
module namespace level-transform = 
"http://marklogic.com/rest-api/transform/levelTransformation";;

declare function level-transform:raw(
  $context as map:map,
  $params as map:map,
  $content as document-node()
)
{
.......
};

In the above module when used I am facing issue as $context is getting document 
content which is failing as it's taken as map:map , $content is empty and 
$params is having transformation configuration.

After trying  a lot I figured that $context and $content are getting swapped. 
Is this an issue? Or am I doing something wrong here?

Can I get some help here as I am getting XML document (raw) in $context which 
is not as per documentation 
(http://docs.marklogic.com/guide/rest-dev/transforms#id_17421)

Thanks and Regards,

Gnanaprakash Bodireddy
Sr Associate - Projects | IME
Cognizant Technology Solutions
VNET: 672103
(O): +91 (40) 44514444 extn: 672103
(M): +91-8897575644

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to