I commented out a line in my Return clause so that I could test performance. To my surprise, the comment was interpreted as part of the literal response, and the expression within the commented line was evaluated. If this is expected behaviour, is there a workaround?
This is expected behavior, as you may want to have smileys in your XML snippets:
<x> (: </x>
As workaround, you can either use XML comments...
<x><!-- ... --></x>
...or sth like this:
<x>{ (: ... :) () } </x>
return
<dup> <pii>{ $val }</pii>
(: {/results/dataset/item[pii = $val]/dbpath} :)
</dup>
Result:
<dup>
<pii>0022-0728(92)80265-6</pii>
(: <dbpath>SCODAT00000000001/15726657/v336i1-2/0022072892802657/main.xml</dbpath>
<dbpath>SCODAT00000000002/15726657/v336i1-2/0022072892802656/main.xml</dbpath> :)
</dup>
<dup>
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.