Forum How do I...?

Setting small caps from CSS without touching XML?

_savage
I've got some text, for example:
    <par>
This booklet comes from the Majjhima Nikāya MN-36, the Mahāsaccaka Sutta, The Greater Discourse to Saccaka, given by the Buddha and is taken from the translation by Bhikkhu Ñāṇamoli and Bhikkhu Bodhi.
    </par>

and I would like to set the "MN-36" in small caps. I assume I'd have to markup the "MN"? Or is there some automajic way that I can express in CSS that every "MN-" should be set in small caps?
mikeday
You would have to add markup. You could use JavaScript to add the markup, if you like. :)
_savage
Wait... Prince has a Javascript interpreter?

Because the XML (or better, XHTML) file is generated by Python, I could just extend the Python script to sprinkle markup into the generated file.
mikeday
Yes, Prince can run basic JavaScript. We're still working on adding more DOM support.

If you're generating the document from Python then that would be the best place to do it.
_savage
Very schnufte, thanks Mike :)