Hi,

I'm trying to output data in HTML format, but I can't get the ending <br/>
to be recognized as HTML (i.e. it shows up as part of the output instead of
causing a line feed).

Any ideas ?

Regards,
Danny

=======================================================================================================

xdmp:set-response-content-type("text/html"),
let $userId  := "1006802"
let $user := /user[userId=$userId]
let $registrations := $user/registeredBooks/registration
let $response := (

             fn:concat ("userId         : ", $userId),
             fn:concat ("email          : ", $user/email/text()),
             fn:concat ("userType       : ", $user/userType/text()),
)
return

       (
             '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
">',
             <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en">
             <body>
                 <b>{$userId}</b><b/r>
                 {
                   for $line in $response
                   return fn:concat($line, "<br/>")
                 }

             </body></html>

       )
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to