xQuery convert string to xhtml

mohammedayoub

New Member
My script builds a string that I need to output to xhtml, but xdmp:unquote() does not seem to like quoted attribute values--specifically the quotes. I end up with the quote character entity in the output where that actual quote mark (") should be. Here is the string:\[code\]let $title_opts := if ( "M.D." eq $acad_title ) then '<option selected="SELECTED" value="http://stackoverflow.com/questions/11350876/M.D.">M.D.</option><option value="http://stackoverflow.com/questions/11350876/D.O.">D.O.</option>' else if ( "D.O." eq $acad_title ) then '<option value="http://stackoverflow.com/questions/11350876/M.D.">M.D.</option><option selected="SELECTED" value="http://stackoverflow.com/questions/11350876/D.O.">D.O.</option>' else '<option value="http://stackoverflow.com/questions/11350876/M.D.">M.D.</option><option value="http://stackoverflow.com/questions/11350876/D.O.">D.O.</option>'\[/code\]and the output:return { xdmp:unquote( $title_opts ) } The angle brackets come out fine with xdmp:unquote(), but the quotes do not. How do I get everything to display properly?
 
Back
Top