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:

http://www.ling.helsinki.fi/~kjarvent/glyphs.xml

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 EXSLT.com for the tokenize() function (which I totally was led to believe was part of XSL 2.0).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s