[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Converting base64 back to image
Hi list At the moment I use the following and it works fine. But is it the way to do it in 2007? Is it possible to use xsl:result-document instead of java.io.FileOutputStream? <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:saxon="http://saxon.sf.net/" xmlns:fos="java.io.FileOutputStream"> <xsl:template match="/"> <xsl:variable name="img" select="concat('c:\test\jesper', '.jpg')"/> <xsl:variable name="fos" select="fos:new(string($img))"/> <xsl:value-of select="fos:write($fos, saxon:base64Binary-to-octet(xs:base64Binary(my-base64-encoded-image)))"/> <xsl:value-of select="fos:close($fos)"/> </xsl:template> </xsl:stylesheet> Cheers, Jesper Tverskov www.xmlkurser.dk www.xmlplease.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|