As I am beginning to work with TGE, I am thinking about how best to represent this kind of transformation. PIR is great for now but the language tag keeps leaping out to my eye and I keep wondering about the future of tree transformations.
There are a couple of examples for transforming trees already avaliable from the mark up language world. In SGML, you can do this with DSSSL, which is a scheme like language. I have not worked with it. In XML, you have two XSL:FO and XSLT. From what I have gathered, XSL:FO is for formatting to any other format while XSLT is for formatting into another XML representation. These two languages use XML as their base language rather than some other representation like DSSSL.
It will be interesting to see what the wizards have up their sleeves for the transformation end of the compiler tool chains. I would figure that it would go down the same path as PGE as a Perl6 like syntax. Although, scheme and lisp have much going for them in terseness but I think that it would be easier for a programmer if they representation of the transformation is in a similar langauge as their grammar. Thus, although, I sometimes wonder about using XML as a transformation language, it seems to work out quite well for its purpose.