let $wrap := true() ,
$p := <p>something here</p>
return
if( $wrap ) then <html><body>{$p}></html></body> else $p
From: [email protected] [mailto:[email protected]] On Behalf Of
Misztur, Chris
Sent: Monday, December 16, 2013 11:28 AM
To: [email protected]
Subject: [xquery-talk] Wrapping element conditionally
How would I get the output to look like:
<html><body><p/></body><html>
Or just:
<p/>
Based on the below script?
xquery version "3.0";
let $wrap := true()
return
(
if($wrap) then(<html><body>) else ()
<p>something here</p>
if($wrap) then(</body></html>) else ()
)
________________________________
The contents of this message may be privileged and confidential. Therefore, if
this message has been received in error, please delete it without reading it.
Your receipt of this message is not intended to waive any applicable privilege.
Please do not disseminate this message without the permission of the author.
Please consider the environment before printing this e-mail
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk