PhoenixmlDb.XQuery

NamespaceOutput

Resolves the namespace ids of nodes being serialized. A node store resolves the ids it allocated; the well-known ids are permanent () and resolve even in a store that never registered them. Any other id that resolves nowhere is a defect upstream — an id from another store or compilation — and fails loudly: the serializers used to write it as "" or "urn:unresolved:p", silently putting the node in a different namespace (or printing xmlns:p="", which XML 1.0 forbids).

#NamespaceOutput

Namespace: PhoenixmlDb.XQuery

Resolves the namespace ids of nodes being serialized. A node store resolves the ids it allocated; the well-known ids are permanent (

) and resolve even in a store that never registered them. Any other id that resolves nowhere is a defect upstream — an id from another store or compilation — and fails loudly: the serializers used to write it as "" or "urn:unresolved:p", silently putting the node in a different namespace (or printing xmlns:p="", which XML 1.0 forbids).

#Methods

#Bind(Collections.Generic.IReadOnlyDictionary<String,String>,Collections.Generic.Dictionary<String,String>,String,String)

Records that

is bound to

for an element's children, copying the parent's scope only when the element changes it.

#IsInScope(Collections.Generic.IReadOnlyDictionary<String,String>,String,String)

The declarations to write on the root element of a serialization: its whole in-scope set. A parsed element records only the xmlns attributes physically on it, so written on its own it lost the bindings it inherits from its ancestors (#57: fn-union-node-args-015 dropped xmlns:foo and xmlns:xsi). Descendants need nothing extra — their ancestors' bindings are already in scope in the output.

True if

is already bound to

in the output being written. XmlWriter.LookupPrefix(uri) answers a different question — which ONE prefix is bound to the URI — so when the default namespace and p share a URI it returns "" and xmlns:p was written again on every copied descendant (#57).

#UriFor(PhoenixmlDb.Core.NamespaceId,String,String)

Parameters:

  • id — The namespace id on the node or declaration.

  • resolved — What the node store returned for id.

  • name — The name being written, for the error message.