pub struct IdAttributeRegistration { /* private fields */ }Expand description
Caller-declared XML ID attribute registration.
Registrations are request context rather than security policy. A global registration applies an attribute local name to every element; a scoped registration applies to one element local name in either any namespace or one exact namespace.
Implementations§
Source§impl IdAttributeRegistration
impl IdAttributeRegistration
Sourcepub fn global(attribute_local_name: impl Into<String>) -> Self
pub fn global(attribute_local_name: impl Into<String>) -> Self
Register an attribute local name as an ID on every element.
Sourcepub fn scoped_any_namespace(
attribute_local_name: impl Into<String>,
element_local_name: impl Into<String>,
) -> Self
pub fn scoped_any_namespace( attribute_local_name: impl Into<String>, element_local_name: impl Into<String>, ) -> Self
Register an attribute as an ID on a local element name in any namespace.
This models libxmlsec1’s unqualified --id-attr element-name contract.
Sourcepub fn scoped(
attribute_local_name: impl Into<String>,
element_local_name: impl Into<String>,
element_namespace: Option<&str>,
) -> Self
pub fn scoped( attribute_local_name: impl Into<String>, element_local_name: impl Into<String>, element_namespace: Option<&str>, ) -> Self
Register an attribute as an ID only on matching elements.
element_namespace is the namespace URI, not an XML prefix. None
matches only elements without a namespace.
Sourcepub fn with_attribute_namespace(self, namespace: Option<&str>) -> Self
pub fn with_attribute_namespace(self, namespace: Option<&str>) -> Self
Restrict this registration to an exact attribute namespace URI.
None matches unqualified attributes only. Without this restriction,
registrations retain xmlsec-style local-name matching in any namespace.