xsdata.utils.namespaces module¶
-
xsdata.utils.namespaces.load_prefix(uri, ns_map)[source]¶ Get or create a prefix for the given uri in the prefix-URI namespace mapping.
-
xsdata.utils.namespaces.generate_prefix(uri, ns_map)[source]¶ Generate and add a prefix for the given uri in the prefix-URI namespace mapping.
-
xsdata.utils.namespaces.prefix_exists(uri, ns_map)[source]¶ Check if the uri exists in the prefix-URI namespace mapping.
-
xsdata.utils.namespaces.clean_prefixes(ns_map)[source]¶ Remove default namespace if it’s also assigned to a prefix.
-
xsdata.utils.namespaces.clean_uri(namespace)[source]¶ Remove common prefixes and suffixes from a uri string.