[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Decode Base64 data and namespaces

Subject: Re: Decode Base64 data and namespaces
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 28 Jun 2010 12:25:25 +0100
Re:  Decode Base64 data and namespaces
I have two questions-

Then ask them separately. That way the archives will be intelligible.
1) Can one element belong to two namespaces?

2) I have a Base64 string that belongs to an image and what I want to do
is to convert that base64 string into an image and display that image in

In principle, the data: URI scheme should handle this nicely. In practice, I don't know how widely supported it is, so you may have to write external image files as you suggest. This will require an extension function. Although there's been a lot of talk about serializing binary files as an EXpath extension, I don't think anything has actually happened yet; I think you'll have to do it yourself.

Michael Kay

I did get a code to do that but through fos, but the problem is
that I have to use JDOM as processor which doesn't allow the functions
that I used. Can you please provide any other alternative? Here is the
code I used:

         <xsl:variable name="b64" select="b64:new(string(.))"/>
         <xsl:variable name="img" select="concat('C:\', @filename)"/>
         <xsl:variable name="fos" select="fos:new(string($img))"/>
         <xsl:value-of select="fos:write($fos,
         <xsl:value-of select="fos:close($fos)"/>

Plus I don't want to specify any location to store the image (like I had
to do here as 'C:\'), can I use a method so that the output image is
stored at the same location as the xslt output (on the lines of what
xsl:result-document does)?

Thanks very much,

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.