Fork me on GitHub

Project Notes

#433 XSLT Mandelbrot

Playing with Joel Yliluoma’s demonstration of the power of XSLT: generating a Mandelbrot set, rendered with HTML.

Notes

I found this featured on The Daily WTF back in the day. The original author is Joel Yliluoma

The mandelbrot.xml defines the parameters of the Mandelbrot set, and the colour mapping for magnitudes. The calculation of the Mandelbrot set is performed by the transform mandelbrot.xsl.

I am running this on macOS, and using xsltproc, which is installed by default as part of the libxslt. I use this to perform the transformation:

xsltproc mandelbrot.xsl mandelbrot.xml > mandelbrot.html

The resulting image:

mandelbrot1

I modified some parameters in mandelbrot2.xml and generated a new image:

xsltproc mandelbrot.xsl mandelbrot2.xml > mandelbrot2.html

mandelbrot2

Credits and References

About LCK#433
XSLT

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

Project Source on GitHub Return to the LittleCodingKata Catalog
About LittleCodingKata

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.

Follow the Blog follow projects and notes as they are published in your favourite feed reader