Skip to main content

Module model

Module model 

Source

Structs§

Model
TagFrame

Constants§

LTX_NAMESPACE

Statics§

MODEL

Functions§

add_schema_declaration
add_tag_attribute
add_tag_content
can_contain
&str wrapper over the canonical can_contain_sym; interns both names and delegates. Kept for call sites that hold string names rather than SymStr.
can_contain_sym
The single faithful containment check (Perl Common/Model.pm::canContain), keyed on interned SymStr names — the arena’s native currency. This is the canonical implementation; can_contain is a thin &str wrapper over it.
can_have_attribute
decode_qname
Given a Qualified name, possibly prefixed with a namespace prefix, as defined by the code namespace mapping, return the NamespaceURI and localname.
decode_qname_sym
TODO: We need a proper data model to deal with the Symbol - String distinction. For now let’s allocate strings and release the arena, but this is a CODE SMELL!
get_document_namespace
get_document_namespace_prefix
get_document_namespace_prefixes
Returns all registered document namespace prefixes and their URIs.
get_foreign_node_qname
get_node_qname for a node read out of a FOREIGN document — a tree parsed by crate::common::xml::parse_fragment rather than built by us. Used by Document::append_tree, the one place such a tree is ever walked.
get_namespace
get_namespace_prefix
Get the (code) prefix associated with $namespace, creating a dummy prefix and signalling an error if none has been registered.
get_node_attribute
Read a possibly-PREFIXED attribute off a node, resolving the prefix the same way Document::set_attribute does on the write side (via decode_qname).
get_node_document_qname
Same as get_node_qname, but using the Document namespace prefixes
get_node_qname
get_tag_contents
get_tags
initialize_model
is_in_schema_class
is_node_in_schema_class
is_permissive
load_schema
register_document_namespace
Bind an OUTPUT-document prefix to a namespace URI, on the current model.
register_namespace
Bind a CODE prefix to a namespace URI, on the current model.
remove_node_attribute
Remove a possibly-PREFIXED attribute — the counterpart of get_node_attribute, with the same namespace resolution.
set_model
set_relaxng_schema
set_schema
set_schema_class
with_code_namespaces
with_node_qname
Borrow a node’s qualified name (ltx:section, #PCDATA, …) as a &str for the duration of caller.
with_schema_data

Type Aliases§

IndirectModel