exists this:param:param this:cond copy this:param:param#xpointer(/) var:gt StringToCanonicalString this:param:param var:gt copy sloot.default.golden.thread var:gt exists this:param:action this:cond copy this:param:action#xpointer(/) var:action StringToCanonicalString this:param:action var:action copy cut var:action exists this:param:resource this:cond copy this:param:resource var:resource copy active:sloot.void var:resource sloot.xquery declare variable $thread as node() external; declare variable $action as node() external; if (string($action)='attach') then ( <idoc> <seq> <instr> <type>attachGoldenThread</type> <operand>this:param:resource</operand> <param>{string($thread)}</param> <target>this:response</target> </instr> </seq> </idoc> ) else ( <idoc> <seq> { if (string($action)='cut') then ( <instr> <type>cutGoldenThread</type> <param>{string($thread)}</param> </instr> ) else ( <instr> <type>cutGoldenThreads</type> <param>{string($thread)}</param> </instr> ) } <instr> <type>copy</type> <operand>this:param:resource</operand> <target>this:response</target> </instr> </seq> </idoc> ) var:gt var:action var:script copy var:script ffcpl:/sloot-trace/goldenthread.script.xml dpml var:script var:resource this:response