I am trying to write an xquery for DB2 to give me an HTML output. I have something like:
xquery
<html>
<head>
<title>Circuit Idea Catalog</title>
</head>
<body>
<table border="1">
<tr>
<th>Design ID</th>
<th>Title</th>
<th>Abstract</th>
</tr>
{
for $x in db2-fn:xmlcolumn('IDEA.DETAILS')/Ideas/Record_Info
order by $x/DesignID
return <tr><td>{data($x/DesignID)}</td><td>{data($x/Title)}</td><td>{data($x/parent::*/Design_Details/Abstract)}</td></tr>
}
</table>
</body>
</html>~
This does not work properly and does not give me the full results compared to if I just have this: xquery for $x in db2-fn:xmlcolumn('IDEA.DETAILS')/Ideas/Record_Info order by $x/DesignID return {data($x/DesignID)}{data($x/Title)}{data($x/parent::*/Design_Details/Abstract)}
Somehow it does not like the tags. Also it gives a lot of extra text which I don't want in my html file. Is there a way just get the html output and save it to a file.
No comments:
Post a Comment