Corona
Corona copied to clipboard
Sample Insert Transformer
import module namespace imu = "http://xqdev.com/in-mem-update" at "/MarkLogic/appservices/utils/in-mem-update.xqy";
(: xdmp:eval(string($transformer), (xs:QName("content"), $content, xs:QName("requestParameters"), $requestParameters, xs:QName("testMode"), false()),
declare variable $content as node() external ; declare variable $requestParameters as map:map external; declare variable $testMode as xs:boolean external;
if ($testMode) then () else let $uuid := map:get($requestParameters, "uuid") let $content := imu:node-replace($content/question/@qid, attribute qid {$uuid}) return $content
Bob,
Can you say a little bit more here?
-Eric
Yes, Eric, but I am lame with GITHUB. I will try to provide a sample that shows what I have learned. Maybe I can learn something, but I could not simple comment. Bob
On Thu, Sep 6, 2012 at 11:20 PM, Eric Bloch [email protected]:
Bob,
Can you say a little bit more here?
-Eric
— Reply to this email directly or view it on GitHubhttps://github.com/marklogic/Corona/issues/88#issuecomment-8354897.
Robert Starbird Software Professional Services Leader and Engineer Cell: (781) 548-9427 [email protected] http://www.linkedin.com/in/robertstarbird
Ah, there is [email protected] if you're looking to open a conversation. The issues thing is really just for bugs and rfes - neither of which does this appear to be (as far as i can tell).
Agreed. It was a sample that I thought I could share for a baseline xquery
transform. It was not immediately obvious that the eval during transform
insert would fail with the sample data
Bob
On Thu, Sep 6, 2012 at 11:47 PM, Eric Bloch [email protected]:
Ah, there is [email protected] if you're looking to open a conversation. The issues thing is really just for bugs and rfes - neither of which does this appear to be (as far as i can tell).
— Reply to this email directly or view it on GitHubhttps://github.com/marklogic/Corona/issues/88#issuecomment-8355262.
Robert Starbird Software Professional Services Leader and Engineer Cell: (781) 548-9427 [email protected] http://www.linkedin.com/in/robertstarbird