A quick screenshot of the XML+XSLT > HTML thingie. The actual code for the transformation is pretty short, but the results can be pretty impressive. I had to really give up on using and .svg graphics because even those browsers that have .svg capabilities cannot handle too many of them at the same time. A hundred glyphs is enough to slow things down considerably, and more will just make it hang. and large .pngs instead, though I wish Firefox had better image-resizing and antialising. Oh well. Optimized pngs are damn small, too, a two-bit (with transparency!) black and white pic of about 100×100 pixels is under half a kilobyte.

Playing around with XMLising the FMSS

Just a small thing I did with XML and XSLT > HTML transformations, adding some stuff to my older XSLT stuff:

In this XML file, an element contains a set of words (here just “chaos chaos chaos chaos” etc.) that are transformed into tags that contain as their data-attribute a word + .svg. In the final rendering, “chaos chaos chaos” has turned into a bunch of following chaos star pictures within the text. This can be used to “write” any kind of special glyphs, as long as there’s an .svg file with the right name. It’s like a batched img tag. For the FMSS it would look something like this: teke ta2 työ ta1 päivä pl pitkä pl, representing the Finnish phrase “tehdä työtä päivät pitkät”, ‘to work all day long (lit. the days longs)’, rendered with the glyphs TEKE+TA2 TYÖ+TA1 PÄIVÄ+PLURAL PITKÄ+PLURAL (sans spaces).

The XSLT file contains an imported namespace from for the tokenize() function (which I totally was led to believe was part of XSL 2.0).