Skip to main content

get_namespace_prefix

Function get_namespace_prefix 

Source
pub fn get_namespace_prefix(
    namespace: &str,
    _forattribute: bool,
    probe: bool,
) -> Option<SymStr>
Expand description

Get the (code) prefix associated with $namespace, creating a dummy prefix and signalling an error if none has been registered.

In the following: $forattribute is 1 if the namespace is for an attribute (in which case, there must be a non-empty prefix) $probe, if non 0, just test for namespace, without creating an entry if missing.