/** Unwraps the original context and forwards the call. */ @Override public void setNamespaceContext(NamespaceContext context) throws XMLStreamException { if (context instanceof FilteredNamespaces) { context = ((FilteredNamespaces) context).inverse(version); } else { context = new FilteredNamespaces(context, version, true); } out.setNamespaceContext(context); }