Subject: [xsl] Converting base64 back to image From: "Jesper Tverskov" <jesper@xxxxxxxxxxx> Date: Mon, 22 Oct 2007 12:50:55 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] changing value of xi:incl, Michael Kay | Thread | RE: [xsl] Converting base64 back to, Michael Kay |
[xsl] changing value of xi:include', Nancy Brandt | Date | [xsl] xsl:perform-sort sequence pro, Merico Raffaele |
Month |