Name
xte_expand_xmlns, xmlnss_get, xmlnss_xpath_pre — resolve and query XML namespace bindings in an entity
Synopsis
XML xte_expand_xmlns(
|
in tree any); |
XML xmlnss_get(
|
in entity XML); |
XML xmlnss_xpath_pre(
|
in entity XML); |
Description
xte_expand_xmlns walks an XML parse tree and rewrites
all namespace-prefixed element and attribute names into their fully
expanded {namespace-uri}local-name form. The result has
every reference resolved against the in-scope xmlns:
declarations of the tree, so subsequent processing does not need to track
prefix bindings.
xmlnss_get returns the namespace bindings currently
in scope at the root of entity, as a flat XML
fragment whose attributes give prefix-to-URI mappings. Useful for
inspecting or serializing the namespace context of an entity outside of
the XML tree itself.
xmlnss_xpath_pre prepares
entity for XPath evaluation by emitting the
namespace declarations that an XPath expression would otherwise have to
supply via declare namespace prologues. Equivalent to
building an XPath namespace prefix table from the entity's current scope.