I want to use xquery to transform an xml document to another one. Some of the tags in the output xml are conditional based on the value of the input xml document. How to write this in xquery? I used following xquery statement:
if (fn:not(fn:empty($s))) then fn:concat(“”, $var1, “</BOOK”) else “”
But the output from the xquery replaced ‘<’ with < and ‘>’ with >. Is this the correct way of implementing this? How to avoid such replacement?
thanks!