function-libraries

XSLT: Is there a way to "inherit" canned functionality?

i am once again having to cobble together a bit of XSLT into order to turn generated XML into (rather than simply generating HTML). i'm having huge deja-vu this time again. i'm once again having to solve again basic problems, e.g.: how to convert characters into valid html entity references how to preserve whitespace/carriage returns...