The definition of namespaces in the specification implies that they should not end with a '/', but we currently do not detect or prevent that.
I would recommend applying this both in object construction and in Document.set_namespace. If a terminal '/' is found, remove and warn.
Related to #328