You are on page 1of 1

BLOB Images in XML Publisher -------------------------------------------BLOB is a collection of binary data stored as a single entity in a database manag ement system.

Blobs are typically images, audio or other multimedia objects, tho ugh sometimes binary code is stored as a blob. Database support for blobs is not universal. (wikipedia) Support for extracting BLOB images to XML is coming, the XMLP extraction engine will extract the images and encode to base64 in the XML, you will then be able t o pull this into the output via the RTF template. Following are something that you should know: Can t generate xml data for CLOB more than 40 kb in report builder. BLOB Images are supported in XML Publisher 5.6.2 or later. Encode BLOB to CLOB use this following function: CREATE FUNCTION getbase64( p_source BLOB ) RETURN CLOB IS v_result CLOB; BEGIN DBMS_LOB.createtemporary(lob_loc => v_result, CACHE => FALSE, dur => 0); Wf_Mail_Util.EncodeBLOB ( p_source, v_result); RETURN ( v_result ); END getbase64; To show BLOB Images use the following code: <fo:instream-foreign-object content-type= image/jpg ><xsl:value-of select= .//IMAGE_ />< /fo:instream-foreign-object> XML Publisher supports in general right now only JPG, GIF and PNG. Notice the template needs to know the mime type of the image, in this case image/ jpg The IMAGE_ contains the base64 encoded image data. Template and sample data h ere (remove the extension .odt ) Update: 22-Sep-2010 Call BLOB image on footer:

You might also like