Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from paxtonhare/76_rest_transform_get_content_…
…only fixed #76 - added transform to get content only
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
data-hub/src/main/resources/ml-modules/transforms/get-content.xqy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
xquery version "1.0-ml"; | ||
|
||
module namespace transform = "http://marklogic.com/rest-api/transform/get-content"; | ||
|
||
declare namespace envelope = "http://marklogic.com/hub-in-a-box/envelope"; | ||
|
||
declare function transform( | ||
$context as map:map, | ||
$params as map:map, | ||
$content as document-node() | ||
) as document-node() | ||
{ | ||
document { $content/envelope:envelope/envelope:content/node() } | ||
}; |