[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to decode Base64 in XSLT?
>>>>> "MK" == Michael Kay <mike@xxxxxxxxxxxx> writes: IS> Now, how do I convert these Base64 strings into the respective IS> binary strings? MK> It rather depends on what you want the output to be. There's no MK> such thing as a "binary string" recognized by the XDM type MK> system. It looks like I'd need a work-around then. MK> Perhaps you want a string in which the one and zero bits are MK> represented by Unicode characters "0" and "1"? Or in which the MK> octets are represented as a space-separated sequence of decimal MK> integers (0-255)? There, I need a string composed of the characters which, being represented in a chosen unibyte encoding, will correspond to the sequence of codes that the Base64 string itself encodes. As the XSLT program will have: <xsl:output method="text" encoding="UNIBYTE-ENCODING" /> I guess that the character string thus obtained will be translated to the intended byte string in the output. (Hopefully the implementation won't do any conversions, such as CR/LF to LF or vice versa.) MK> Whatever the output you want, there isn't very much in the standard MK> function library to help you. Saxon has MK> saxon:base64Binary-to-octets > http://www.saxonica.com/documentation/extensions/functions/base64binarytooctets.html MK> which may or may not help you. It won't, but saxon:base64Binary-to-string () probably will. Thanks! [...] -- FSF associate member #7257
|
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
|