export: XML output has %26 all through my HTML Editor Standard fields
Hi, I am stumped by the export: XML functionality and its insistence on escaping ampersands into '%26' in my outputted XML file.
My app has a simple table with two fields that are input using Display As: HTML Editor Standard items. The rest of my fields are straight text. When I query it, the data stored in these fields is indeed HTML, which is perfect.
Now I want to use an ApEx report page that exports as XML in conjunction with a XSL template to render the data into a small HTML table. However, try as I may, I cannot get the HTML fields to render out. ApEx seems to URI-escape all of the ampersands into %26's.
for example, here's a fragment from the outputted XML file (TOPIC is the field with the HTML in it):
<ROW ROWNUM="3">
<ID>1</ID>
<START_DATE_TIME>11-NOV-07</START_DATE_TIME>
<END_DATE_TIME>14-NOV-07</END_DATE_TIME>
<TOPIC>%26lt;font face="Arial" color="#ff0000" size="1"%26gt;Status Meeting%26lt;font color="#0000ff"%26gt;(New Call ID %26amp;amp; Web Conf ID)%26lt;/font%26gt;%26lt;/font%26gt;</TOPIC>
<TOPIC_URL>http://www.oracle.com</TOPIC_URL>
This replacement of & with %26 only occurs in the output XML file--if I execute the Report's Region Source SQL in the SQL Workshop it renders correctly (I think). Ampersands look like & when I run the query.
I've played around with HTF.escape_sc() and DBMS_XMLGEN.convert() and find that these successfully escape my HTML, but then the XML file that is output still has each of it's ampersands converted into %26.
On the XSLT side, I can't figure out a way to unescape the output so that I can drop the HTML directly into my templates and have it render in-line.
Is there a way to join up a HTML Editor Standard item with a XSL stylesheet via ApEx's XML reports?
thanks
-paul