Added the namespaces at the start of the document (suggested by and thanks to Alasdair)