NS
NAME
LibXML::Class::NS - base role for namespace-aware classes
DESCRIPTION
This role implements the most basic namespace functionality which includes:
default namespace value
default namespace prefix value
map of namespace prefixes into namespaces
Attributes
Str $.xml-default-nsThe default namespace value, when set.
Str $.xml-default-ns-pfxThe default namespace prefix, when set.
OHash:D $.xml-namespacesAn ordered hash of namespace prefix values.
OHashis an internal implementation provided by LibXML::Class::Types.
Methods
method xml-set-ns-from-defs($ns-defs, Bool:D :$override = True)This method sets up namespace information from declarations in
$ns-defs, as described in LibXML::Class::Manual, where named argument:namespace(or:ns) is described.method xml-guess-default-ns(LibXML::Node :$resolve)This method does the most basic job in trying to find out what namespace applies to the object. It is using only the information provided by the object itself. When guessing
$.xml-default-nsis ignored if$.xml-default-ns-pfxis set. And if the prefix cannot be resolved using the local definitions in$.xml-namespacesthen it tries to use the$resolveparameter, if provided.When no namespace can be found a Failure is returned wrapped around
LibXML::Class::X::NS::Prefixexception.
SEE ALSO
COPYRIGHT
(c) 2023, Vadim Belman <[email protected]>
LICENSE
Artistic License 2.0
See the LICENSE|../../../../LICENSE file in this distribution.