I can test/review the code, if you want. It would be a nice thing to have in postgresql, obviously once you prepare statement enough to convince Tom :) XSLT is a necessity , otherwise it won't be standard, and thus - quite useless.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных