@classmethod
def register_nsdoc_class(cls, doc_class, xname):
    """Registers a document class

        Internally XMLNSParser maintains a single table of document
        classes which can be used to identify the correct class to use
        to represent a document based on the expanded name of the root
        element.

        doc_class
            the class object being registered, it must be derived from
            :py:class:`NSDocument`

        xname
            A tuple of (namespace, name) representing the name of the
            root element.  If either (or both) components are None a
            wildcard is registered that will match any corresponding
            value."""
    cls._nsdoc_class_table[xname] = doc_class
