@@ -274,38 +274,38 @@ public void test118() {
274274 }
275275
276276/*
277- @Test
278- public void testIssue471() {
279- String transform = "xquery version '1.0-ml';" +
280- "module namespace transform = 'http://marklogic.com/rest-api/transform/testIssue471';" +
281-
282- "import module namespace json = 'http://marklogic.com/xdmp/json' at '/MarkLogic/json/json.xqy';" +
283-
284- "declare namespace search = 'http://marklogic.com/appservices/search';" +
285-
286- "declare function transform(" +
287- " $context as map:map," +
288- " $params as map:map," +
289- " $content as document-node()" +
290- ") as document-node()" +
291- "{" +
292- " let $c := json:config('custom') ," +
293- " $cx := map:put( $c, 'whitespace', 'ignore' )," +
294- " $cx := map:put( $c, 'text-value', 'label' )," +
295- " $cx := map:put( $c, 'camel-case', fn:true() )," +
296- " $cx := map:put( $c, 'json-attributes', ('snippet-format', 'total', 'start', 'page-length'))," +
297- " $cx := map:put( $c, 'array-element-names', (xs:QName('search:result')))" +
298- " let $_ := map:put($context, 'output-type', 'text/json')" +
299- " let $json := json:transform-to-json( $content ,$c )" +
300- " return $json" +
301- "};";
302- extensionMgr.writeXQueryTransform( "testIssue471", new StringHandle().with(transform));
303- QueryManager q = Common.client.newQueryManager();
304- StringQueryDefinition s = q.newStringDefinition();
305- s.setCriteria("a");
306- s.setResponseTransform(new ServerTransform("testIssue471"));
307- JacksonHandle response = q.search(s, new JacksonHandle());
308- System.out.println(response.toString());
309- }
277+ @Test
278+ public void testIssue471() {
279+ String transform = "xquery version '1.0-ml';" +
280+ "module namespace transform = 'http://marklogic.com/rest-api/transform/testIssue471';" +
281+
282+ "import module namespace json = 'http://marklogic.com/xdmp/json' at '/MarkLogic/json/json.xqy';" +
283+
284+ "declare namespace search = 'http://marklogic.com/appservices/search';" +
285+
286+ "declare function transform(" +
287+ " $context as map:map," +
288+ " $params as map:map," +
289+ " $content as document-node()" +
290+ ") as document-node()" +
291+ "{" +
292+ " let $c := json:config('custom') ," +
293+ " $cx := map:put( $c, 'whitespace', 'ignore' )," +
294+ " $cx := map:put( $c, 'text-value', 'label' )," +
295+ " $cx := map:put( $c, 'camel-case', fn:true() )," +
296+ " $cx := map:put( $c, 'json-attributes', ('snippet-format', 'total', 'start', 'page-length'))," +
297+ " $cx := map:put( $c, 'array-element-names', (xs:QName('search:result')))" +
298+ " let $_ := map:put($context, 'output-type', 'text/json')" +
299+ " let $json := json:transform-to-json( $content ,$c )" +
300+ " return $json" +
301+ "};";
302+ extensionMgr.writeXQueryTransform( "testIssue471", new StringHandle().with(transform));
303+ QueryManager q = Common.client.newQueryManager();
304+ StringQueryDefinition s = q.newStringDefinition();
305+ s.setCriteria("a");
306+ s.setResponseTransform(new ServerTransform("testIssue471"));
307+ JacksonHandle response = q.search(s, new JacksonHandle());
308+ System.out.println(response.toString());
309+ }
310310*/
311311}
0 commit comments