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

Re: how to decode Base64 in XSLT?

Subject: Re: how to decode Base64 in XSLT?
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Thu, 15 Apr 2010 08:48:33 +0530
Re:  how to decode Base64 in XSLT?
I'm not sure if this would really help.

But I implemented a base64 encoding & decoding implementation natively
in XSLT some time ago (it is a 1.0 solution, since it was written long
time ago). It could be found at:


On Thu, Apr 15, 2010 at 1:36 AM, Ivan Shmakov <oneingray@xxxxxxxxx> wrote:
> B  B  B  B I'm developing an XML representation for the .torrent files.
B It
> B  B  B  B was quite trivial to convert the XML bit like, e. g.:
> <?xml version="1.0" ?> <!-- -*- XML -*- -->
> <torrent
> B  xmlns="http://www.siamics.net/~ivan/xmlns/xmltorrent">
> B <announce>http://TRACKER:PORT/announce</announce>
> B <comment>COMMENT</comment>
> B <created-by>CREATED-BY</created-by>
> B <info>
> B  B <length>31454056</length>
> B 
B <name>nomad3.ncep.noaa.gov/pub/gfs1p0/gfs20100320/gfs.t12z.pgrbf96</name>
> B  B <piece-length>262144</piece-length>
> B </info>
> </torrent>
> B  B  B  B to the b.torrent formatb. B However, one of the most
> B  B  B  B parts of the .torrent file is the bpiecesb field, containing
> B  B  B  B SHA1 digests of the chunks represented as a single long binary
> B  B  B  B string. B To my mind, it's reasonable to have such a field
> B  B  B  B encoded in Base64, like:
> <torrent ...>
> B ...
> B <info>
> B  B ...
> B  B <pieces>
> B  B  B <digest>TCvyo4Na18vWlW19+pirwGKKMoU=</digest>
> B  B  B <digest>hnWGTGoiouUIZWjX861YIxyMYaM=</digest>
> B  B  B ...
> B  B </pieces>
> B </info>
> </torrent>
> B  B  B  B Now, how do I convert these Base64 strings into the respective
> B  B  B  B binary strings?
> --
> FSF associate member #7257

Mukul Gandhi

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.