move imports to beginning so xsltproc will be happy
Add/fix format-date()
Use library def file now that format-date() is fixed