adding optional 'base' param to getNamespaceDeclaration() to allow to build upon existing namespace