record TXQEvaluationContext

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TXQEvaluationContext = record

Description

evaluation context, internal used

Stores information about the outside scope, needed for correct evaluation of an XQuery-expression

Overview

Fields

RootElement: TTreeNode;
ParentElement: TTreeNode;
TextNode: TTreeNode;
SeqValue: IXQValue;
SeqIndex: integer;
SeqLength: integer;
temporaryVariables: TXQEvaluationStack;
globallyDeclaredVariables: TXQVariableChangeLog;
namespaces: TNamespaceList;
staticContext: TXQStaticContext;

Methods

function findNamespace(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): INamespace;
function findNamespaceURL(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): string;
procedure splitRawQName(out namespace: INamespace; var name: string; const defaultNamespaceKind: TXQDefaultNamespaceKind);
function getRootHighest: TTreeNode;
function hasGlobalVariable(const name: string; out value: IXQValue; const namespaceURL: string = ''): boolean;
function hasGlobalVariable(const v: TXQTermVariable; out value: IXQValue): boolean;
function getGlobalVariable(const name: string; const namespaceURL: string): IXQValue;
function getGlobalVariable(const v: TXQTermVariable): IXQValue; inline;
function parseDoc(const data, url, contenttype: string): TTreeNode;
function SeqValueAsString: string;
function contextNode(mustExists: boolean = true): TTreeNode;
procedure raiseXPDY0002ContextItemAbsent;

Description

Fields

RootElement: TTreeNode;

associated tree (returned by / within an expression)

ParentElement: TTreeNode;

associated tree element (= context item . , if it is not overriden during the evaluation)

TextNode: TTreeNode;

Use this to override the text node returned by text(). This is useful if you have an element <a>xx<b/>yy</a>. If TextNode is nil text() will return xx, but you can set it to yy. However, ./text() will always return xx.

SeqValue: IXQValue;

Context item / value of . , if a sequence is processed (nil otherwise)

SeqIndex: integer;

Position in the sequence, if there is one

SeqLength: integer;

Position in the sequence, if there is one

temporaryVariables: TXQEvaluationStack;

List of variables defined in the outside scope (e.g. for/same/every)

globallyDeclaredVariables: TXQVariableChangeLog;

List of variables declared variables (e.g. declare variable $foo...) (might be nil)

namespaces: TNamespaceList;

Namespace declared in the outside scope (only changed by xmlns attributes of constructed nodes)

staticContext: TXQStaticContext;
 

Methods

function findNamespace(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): INamespace;
 
function findNamespaceURL(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): string;
 
procedure splitRawQName(out namespace: INamespace; var name: string; const defaultNamespaceKind: TXQDefaultNamespaceKind);
 
function getRootHighest: TTreeNode;
 
function hasGlobalVariable(const name: string; out value: IXQValue; const namespaceURL: string = ''): boolean;
 
function hasGlobalVariable(const v: TXQTermVariable; out value: IXQValue): boolean;
 
function getGlobalVariable(const name: string; const namespaceURL: string): IXQValue;
 
function getGlobalVariable(const v: TXQTermVariable): IXQValue; inline;
 
function parseDoc(const data, url, contenttype: string): TTreeNode;
 
function SeqValueAsString: string;
 
function contextNode(mustExists: boolean = true): TTreeNode;
 
procedure raiseXPDY0002ContextItemAbsent;
 

Generated by PasDoc 0.14.0.