PhoenixmlDb.XQuery

PhoenixmlDb.XQuery API Reference

API documentation for the PhoenixmlDb.XQuery library

#PhoenixmlDb.XQuery API Reference

This reference is auto-generated from the .NET XML documentation for the PhoenixmlDb.XQuery assembly.

#PhoenixmlDb.XQuery

Type Description
DelegateMetadataProvider Adapter that wraps delegate-based metadata resolution into the IMetadataProvider interface.
HttpDocumentClient Shared HttpClient for fetching XML documents referenced by fn:doc() / xsl:source-document / fn:doc-available() when the resolved URI is http:// or https://.
IDocumentResolver Resolves document URIs to XDM documents for the XQuery fn:doc() and fn:collection() functions.
IMetadataProvider Provides document-level metadata resolution for the XQuery execution engine.
INodeBuilder Extended node store with node creation capabilities. Adds ID allocation, node registration, and namespace interning for functions that construct new XDM trees (e.g., fn:parse-xml, fn:json-to-xml).
INodeProvider Provides node resolution for the XQuery execution engine.
INodeStore Adapter that wraps a Func`2 delegate into the INodeProvider interface. Extended node provider with read-only tree navigation capabilities. Adds namespace resolution and attribute access beyond basic node lookup.
ISchemaProvider Provides schema awareness to the XQuery and XSLT engines. Public extension point — callers can substitute their own implementation (RelaxNG, Schematron-derived, in-memory, dynamic) by passing it to the QueryEngine constructor.
OutputMethod Output serialization method for XQueryResultSerializer.
SchemaException Thrown when a schema cannot be loaded or compiled. Maps to XQuery error code XQST0059.
SchemaValidationException Thrown when schema validation fails during a validate expression. Maps to XQuery error code XQDY0027.
SerializationOptions Serialization options for XQuery output, corresponding to the declare option output:* declarations in the XQuery prolog.
TreeOrdinalAllocator Allocates process-global, monotonic tree ordinals stamped onto XdmNode.TreeOrdinal so that XDM document order — the pair (TreeOrdinal, Id) — is total and consistent across nodes drawn from independently-constructed node stores (issue #188).
ValidationMode Validation mode for the validate expression.
XQueryFacade A simple string-in / string-out API for XQuery evaluation.
XQueryResultSerializer Serializes XQuery result items (nodes, atomic values, arrays, sequences) to strings.
XdmDocumentStore An in-memory XDM document store that manages parsed XML documents, node resolution, and namespace interning. Implements both INodeProvider and IDocumentResolver so it can be passed directly to QueryEngine.
XdmShape The one place that states how an XDM sequence and an XDM array are told apart at runtime, and the safe operations over that distinction.
XsdSchemaProvider ISchemaProvider implementation backed by XmlSchemaSet. Provides full XSD validation, type annotations, and schema-element/attribute matching.

#PhoenixmlDb.XQuery.FullText

Type Description
AnalyzedTerm A single analyzed term with position information.
FtIsStopWordFunction ft:is-stop-word($word as xs:string) as xs:boolean Tests if a word is a stop word in the default language.
FtScoreFunction ft:score($node as node()) as xs:double Returns the full-text relevance score of a node from the most recent contains-text evaluation. Score is 0.0 (no match) to 1.0 (perfect match), normalized from BM25.
FtStem2Function ft:stem($term as xs:string, $language as xs:string) as xs:string Returns the stemmed form using a language-specific stemmer.
FtStemFunction ft:stem($term as xs:string) as xs:string Returns the stemmed form of a word using the default analyzer.
FtThesaurusLookupFunction ft:thesaurus-lookup($term as xs:string, $relationship as xs:string?) as xs:string* Looks up synonyms/related terms in a thesaurus. Basic built-in thesaurus with common synonyms.
FtTokenize2Function ft:tokenize($text as xs:string?, $language as xs:string) as xs:string* Tokenizes text using a language-specific analyzer.
FtTokenizeFunction ft:tokenize($text as xs:string?) as xs:string* Tokenizes text using the default full-text analyzer. Useful for debugging and understanding how text is analyzed.
FullTextAnalysisOptions Options controlling full-text analysis behavior.
FullTextEngine Full-text search engine powered by Lucene.NET analyzers. Handles tokenization, stemming, and text analysis for XQuery Full-Text queries. Uses Lucene.NET for linguistic analysis (tokenizers, stemmers, stop words) while keeping index storage separate (for LMDB integration).
FullTextIndex Full-text inverted index stored in LMDB. Key format: [term_utf8][0x00][container_id:4][document_id:8] Value format: [frequency:2][position_count:2][positions:4*count] The null byte separator allows prefix scanning by term across all documents. Container ID scoping enables per-container full-text queries.
PostingEntry A single posting list entry — one term in one document.

#PhoenixmlDb.XQuery.Parser

Type Description
ParseError A single parse error with source location information.
XQueryAstBuilder Converts an ANTLR parse tree into the XQuery AST node types.
XQueryErrorListener ANTLR error listener that collects parse errors. Implements both lexer and parser error listener interfaces.
XQueryLexerAdapter An ITokenSource adapter that wraps XQueryLexer to manage lexer mode transitions for XQuery direct element constructors.
XQueryParseException Exception thrown when XQuery parsing fails due to syntax errors in the source text.
XQueryParserFacade Public API for parsing XQuery 3.1 source text into an abstract syntax tree (AST).

#PhoenixmlDb.XQuery.Parser.XQueryParserFacade

Type Description
DepthGuardListener A parse listener that tracks ANTLR rule-invocation nesting depth and aborts the parse with a catchable XQueryParseException once it exceeds XQueryParserFacade.MaxParseDepth. Fires as each rule is entered (before descending into its children) so the runaway recursion stops early. A plain exception is thrown deliberately: ANTLR's DefaultErrorStrategy only catches RecognitionException, so a non-recognition exception propagates straight out of module() rather than triggering error recovery that would resume the descent.

#PhoenixmlDb.XQuery.Security

Type Description
IResourceResolver Custom resource resolver for plugging in external storage backends (S3, database, HTTP, etc.). Return null from any method to fall through to the default resolver.
PolicyEnforcingResolver Wraps an IDocumentResolver and enforces ResourcePolicy rules before delegating to the inner resolver or a custom IResourceResolver.
ResourceAccessDeniedException Thrown when a resource access is denied by the configured ResourcePolicy.
ResourceAccessKind Categorizes the type of resource access being requested.
ResourcePolicy Immutable security policy controlling resource access for XSLT and XQuery engines.
ResourcePolicyBuilder Fluent builder for ResourcePolicy.
ResourceResolverBase Convenience base class for IResourceResolver implementations that only need to handle a subset of resource types.
UriRule Defines a scoped access rule for resource URIs.

#PhoenixmlDb.XQuery.XQueryResultSerializer

Type Description
Utf8StringWriter StringWriter that reports the desired encoding instead of UTF-16.

#PhoenixmlDb.XQuery.XdmDocumentStore

Type Description
ExactUri A URI wrapper that preserves the exact original string without normalization. Uri adds trailing slashes to scheme://host URIs which breaks namespace URI comparison in XML serialization.