namespaces
xsdata.utils.namespaces
load_prefix(uri, ns_map)
Get or create a prefix for the uri in the prefix-URI map.
Source code in xsdata/utils/namespaces.py
17 18 19 20 21 22 23 |
|
generate_prefix(uri, ns_map)
Generate a prefix for the given uri and append it in the prefix-URI map.
Source code in xsdata/utils/namespaces.py
26 27 28 29 30 31 32 33 34 35 36 37 |
|
prefix_exists(uri, ns_map)
Check if the uri exists in the prefix-URI namespace mapping.
Source code in xsdata/utils/namespaces.py
40 41 42 |
|
is_default(uri, ns_map)
Check if the uri exists and it has no prefix.
Source code in xsdata/utils/namespaces.py
45 46 47 |
|
clean_prefixes(ns_map)
Remove default namespace if it's also assigned to a prefix.
Source code in xsdata/utils/namespaces.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
clean_uri(namespace)
Remove common prefixes and suffixes from an URI string.
Source code in xsdata/utils/namespaces.py
66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
build_qname(tag_or_uri, tag=None)
cached
Create namespace qualified strings.
Source code in xsdata/utils/namespaces.py
81 82 83 84 85 86 87 88 89 90 |
|
split_qname(qname)
cached
Split namespace qualified strings.
Source code in xsdata/utils/namespaces.py
93 94 95 96 97 98 99 100 101 |
|
target_uri(qname)
Return the URI namespace of the qname.
Source code in xsdata/utils/namespaces.py
104 105 106 |
|
local_name(qname)
Return the local name of the qname.
Source code in xsdata/utils/namespaces.py
109 110 111 |
|
is_ncname(name)
Verify given string is a valid ncname.
Source code in xsdata/utils/namespaces.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
is_uri(uri)
Verify given string is a valid uri.
Source code in xsdata/utils/namespaces.py
135 136 137 |
|
to_package_name(uri)
cached
Util method to convert a namespace to a dot style package name.
Source code in xsdata/utils/namespaces.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
|