/** * Method called to ensure that the passed-in namespace can be used for actual output operation. * It converts nulls to the proper "no namespace" instance, and ensures that (so far) unbound * namespaces are properly bound (including declaring them as needed). */ protected final SMNamespace _verifyNamespaceArg(SMNamespace ns) { if (ns == null) { return SMOutputContext.getEmptyNamespace(); } if (ns.isValidIn(_context)) { // hunky dory return ns; } /* Hmmh. Callers should know better than to share namespace * instances... but then again, we can easily fix the problem * even if they are shared: */ return getNamespace(ns.getURI()); }