Make your own free website on Tripod.com

Base64 encoding and decoding implementation, with XSLT
 

1. Base64 encoder

The XSLT stylesheet for base64 encoding can be downloaded from, here.

I wrote a base64 encoding script using XSLT, in response to a question asked on XSL-List.

This stylesheet uses an external XML file datamap.xml, as a  lookup table.

The example is tested with Xalan-J 2.6.0:

java org.apache.xalan.xslt.Process -in base64encoder.xsl -xsl base64encoder.xsl

With Saxon 8.0:

java  net.sf.saxon.Transform base64encoder.xsl base64encoder.xsl    

With MSXML 4.0
 

2. Base64 decoder

The XSLT stylesheet for base64 decoding can be downloaded from, here.

This stylesheet uses an external XML file datamap.xml, as a lookup table.

The example is tested with Xalan-J 2.6.0:

java org.apache.xalan.xslt.Process -in base64decoder.xsl -xsl base64decoder.xsl

With Saxon 8.0:

java  net.sf.saxon.Transform base64decoder.xsl base64decoder.xsl    

With MSXML 4.0


Home


Last Updated: Dec 27, 2009