PhoenixmlDb.Core

NamespaceId

A lightweight, strongly-typed identifier for an interned namespace URI.

#NamespaceId

Namespace: PhoenixmlDb.Core

A lightweight, strongly-typed identifier for an interned namespace URI.

NamespaceId is a readonly record struct wrapping an unsigned integer that represents an interned namespace URI. Rather than comparing full namespace URI strings (which can be long), the database interns each unique namespace URI into a compact integer for efficient storage and comparison. This is an internal optimization — application code typically works with QName values and does not need to resolve namespace IDs to URIs directly.

Pre-defined constants are provided for the standard XML and XPath/XQuery namespaces. IDs below NamespaceId.FirstUserNamespaceId (100) are reserved for system use. User-defined namespaces are assigned IDs starting from 100 by the database engine.

The NamespaceId.None value (0) represents the absence of a namespace — elements and attributes with no namespace declaration use this value.

#Constructors

##ctor(UInt32)

A lightweight, strongly-typed identifier for an interned namespace URI.

NamespaceId is a readonly record struct wrapping an unsigned integer that represents an interned namespace URI. Rather than comparing full namespace URI strings (which can be long), the database interns each unique namespace URI into a compact integer for efficient storage and comparison. This is an internal optimization — application code typically works with QName values and does not need to resolve namespace IDs to URIs directly.

Pre-defined constants are provided for the standard XML and XPath/XQuery namespaces. IDs below NamespaceId.FirstUserNamespaceId (100) are reserved for system use. User-defined namespaces are assigned IDs starting from 100 by the database engine.

The NamespaceId.None value (0) represents the absence of a namespace — elements and attributes with no namespace declaration use this value.

See also: QName

#Properties

Name Description
Array The XPath/XQuery Array namespace (http://www.w3.org/2005/xpath-functions/array). Contains functions for working with XDM arrays (XQuery 3.1), such as array:size() and array:flatten(). Conventionally bound to the array prefix.
DcTerms Dublin Core Terms (http://purl.org/dc/terms/). The standard vocabulary for document metadata. Conventionally bound to the dcterms prefix.
Fn The XPath/XQuery Functions namespace (http://www.w3.org/2005/xpath-functions). Contains built-in functions like fn:string(), fn:count(), fn:doc(). Bound to the fn prefix by default in XQuery; functions in this namespace can be called without a prefix.
Map The XPath/XQuery Map namespace (http://www.w3.org/2005/xpath-functions/map). Contains functions for working with XDM maps (XQuery 3.1), such as map:merge() and map:get(). Conventionally bound to the map prefix.
Math The XPath/XQuery Math namespace (http://www.w3.org/2005/xpath-functions/math). Contains mathematical functions like math:sqrt(), math:pi(), and math:pow(). Conventionally bound to the math prefix.
None No namespace (the empty namespace). Used for elements and attributes that are not in any namespace.
PhoenixmlDb The PhoenixmlDb extension namespace (https://schemas.phoenixml.dev/2026/db). Contains database extension functions for use in XQuery expressions. Conventionally bound to the phx prefix, which the engine pre-declares.
PhoenixmlMeta The PhoenixmlDb reserved document-metadata namespace (https://schemas.phoenixml.dev/2026/meta). Engine-set metadata such as content type and size. Conventionally bound to the dbxml prefix.
Xml The XML namespace (http://www.w3.org/XML/1998/namespace). Bound to the xml prefix by definition. Contains attributes like xml:lang, xml:space, and xml:base.
Xmlns The XML Namespaces namespace (http://www.w3.org/2000/xmlns/). Used internally for namespace declarations (xmlns:* attributes). Application code rarely needs to reference this directly.
Xsd The XML Schema namespace (http://www.w3.org/2001/XMLSchema). Defines built-in types like xs:string, xs:integer, xs:dateTime, etc. Conventionally bound to the xs or xsd prefix.
Xsi The XML Schema Instance namespace (http://www.w3.org/2001/XMLSchema-instance). Used for schema-related attributes in instance documents, such as xsi:type, xsi:nil, and xsi:schemaLocation.
Xslt The XSLT namespace (http://www.w3.org/1999/XSL/Transform). Used for XSLT stylesheet elements. Conventionally bound to the xsl prefix.

#Fields

Name Description
FirstUserNamespaceId The first namespace ID available for user-defined namespaces. IDs below this value (0-99) are reserved for system and standard namespaces.

#See also