Class TXQStaticContext

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TXQStaticContext = class(TObject)

Description

Static context containing values read during parsing and not changed during evaluation. Mostly corresponds to the "static context" in the XQuery spec

Hierarchy

  • TObject
  • TXQStaticContext

Overview

Fields

Public sender: TXQueryEngine;
Public moduleNamespace: INamespace;
Public namespaces: TNamespaceList;
Public moduleContextItemDeclarations: array of TXQTermDefineVariable;
Public functions: array of TXQValueFunction;
Public associatedModules: TFPList;
Public importedModules: TStringList;
Public importedSchemas: TNamespaceList;
Public defaultFunctionNamespace: INamespace;
Public defaultElementTypeNamespace: INamespace;
Public decimalNumberFormats: TFPList;
Public baseURI: string;
Public collation: TXQCollation;
Public stripBoundarySpace: boolean;
Public emptyOrderSpec: TXQTermFlowerOrderEmpty;
Public copyNamespacePreserve: boolean;
Public copyNamespaceInherit: boolean;
Public defaultTypeNamespace: INamespace;
Public stringEncoding: TSystemCodePage;
Public strictTypeChecking: boolean;
Public useLocalNamespaces: boolean;
Public objectsRestrictedToJSONTypes: boolean;
Public jsonPXPExtensions: boolean;
Public model: TXQParsingModel;
Public ordering: boolean;
Public constructionPreserve: boolean;

Methods

Public procedure assign(sc: TXQStaticContext);
Public function clone(): TXQStaticContext; virtual;
Public destructor Destroy; override;
Public function findSchema(const namespace: string): TXSSchema;
Public function findNamespace(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): INamespace;
Public function findNamespaceURL(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): string;
Public function findNamespaceURLMandatory(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): string;
Public procedure splitRawQName(out namespace: INamespace; var name: string; const defaultNamespaceKind: TXQDefaultNamespaceKind);
Public procedure splitRawQName(out namespace: string; var name: string; const defaultNamespaceKind: TXQDefaultNamespaceKind);
Public function resolveDocURI(url: string): string;
Public function retrieveFromURI(url: string; out contenttype: string; failErrCode: string): string;
Public function retrieveFromFile(url: string; out contenttype: string; failErrCode: string): string;
Public function ImplicitTimezoneInMinutes: integer; inline;
Public function CurrentDateTime: TDateTime; inline;
Public function findModule(const namespaceURL: string): TXQuery;
Public function findModuleStaticContext(const namespaceURL: string): TXQStaticContext;
Public function findFunction(const anamespace, alocalname: string; const argcount: integer): TXQValueFunction;
Public function findVariableDeclaration( v: TXQTermVariable): TXQTermDefineVariable;
Public function findVariableDeclaration(const namespace, varname: string): TXQTermDefineVariable;
Public function isLibraryModule: boolean;
Public function compareAtomic(a, b: TXQValue; overrideCollation: TXQCollation): integer;
Public function compareAtomic(const a, b: IXQValue; overrideCollation: TXQCollation = nil): integer; inline;
Public procedure compareAtomic(const a, b: IXQValue; out result: IXQValue; accept1: integer; accept2: integer = 9999);
Public function equalAtomic(a, b: TXQValue; overrideCollation: TXQCollation): boolean;
Public function equalAtomic(const a, b: IXQValue; overrideCollation: TXQCollation): boolean;
Public function compareGeneral(a, b: TXQValue; overrideCollation: TXQCollation; accept1: integer; accept2: integer = 9999): boolean;
Public function compareGeneral(a, b: IXQValue; overrideCollation: TXQCollation; accept1: integer; accept2: integer = 9999): boolean;
Public procedure compareGeneral(a, b: IXQValue; out result: IXQValue; accept1: integer; accept2: integer = 9999);
Public function compareDeepAtomic(a, b: TXQValue; overrideCollation: TXQCollation): integer;
Public function compareDeepAtomic(const a, b: IXQValue; overrideCollation: TXQCollation): integer; inline;
Public function equalDeepAtomic(a, b: TXQValue; overrideCollation: TXQCollation): boolean;
Public function equalDeepAtomic(const a, b: IXQValue; overrideCollation: TXQCollation): boolean; inline;
Public class function comparableTypes(const a, b: TXQValue): boolean; static;

Properties

Public property NodeCollation: TXQCollation read getNodeCollation write FNodeCollation;

Description

Fields

Public sender: TXQueryEngine;

Engine this context belongs to

Public moduleNamespace: INamespace;

The namespace of this module or nil

Public namespaces: TNamespaceList;

All declared namespaces.

Public moduleContextItemDeclarations: array of TXQTermDefineVariable;
 
Public functions: array of TXQValueFunction;

All declared functions. Each function contain a pointer to a TXQTerm and a dynamic context containing a pointer to this staticcontext

Public associatedModules: TFPList;
 
Public importedModules: TStringList;

All imported modules as (prefix, module: TXQuery) tuples

Public importedSchemas: TNamespaceList;

All imported schemas. Currently they are just treated as to be equivalent to xs: {TODO.}

Public defaultFunctionNamespace: INamespace;

Default function namespace (engine default is http://www.benibela.de/2012/pxp/extensions)

Public defaultElementTypeNamespace: INamespace;

Default element type namespace (default is empty)

Public decimalNumberFormats: TFPList;
 
Public baseURI: string;

Static base uri

Public collation: TXQCollation;

Default collation for string comparisons

Public stripBoundarySpace: boolean;

If <a> </a> is equivalent to <a/>. Only used during parsing of the query, ignored during evaluation

Public emptyOrderSpec: TXQTermFlowerOrderEmpty;
 
Public copyNamespacePreserve: boolean;
 
Public copyNamespaceInherit: boolean;
 
Public defaultTypeNamespace: INamespace;

Extension: default type namespace. Behaves like the default element type namespace, but does not change the namespace of constructed elements. (default is http://www.w3.org/2001/XMLSchema)

Public stringEncoding: TSystemCodePage;

Encoding of strings. Currently only affects the decoding of entities in direct element constructors

Public strictTypeChecking: boolean;

Activates strict type checking. If enabled, things like "2" + 3 raise an exception, otherwise it is evaluated to 5. Does not affect *correct* queries (and it makes it slower, so there is no reason to enable this option unless you need compatibility to other interpreters)

Public useLocalNamespaces: boolean;

When a statically unknown namespace is encountered in a matching expression it is resolved using the in-scope-namespaces of the possible matching elements

Public objectsRestrictedToJSONTypes: boolean;

When false, all values can be stored in object properties; when true all property values are JSON values (e.g. sequences become arrays, () becomes null, xml is serialized, ...)

Public jsonPXPExtensions: boolean;

Allows further json extensions, going beyond jsoniq (especially child and descendant axis test matching object properties) (for dot operator, see TXQParsingOptions) (default is true)

Public model: TXQParsingModel;
 
Public ordering: boolean;

unused

Public constructionPreserve: boolean;

unused

Methods

Public procedure assign(sc: TXQStaticContext);
 
Public function clone(): TXQStaticContext; virtual;
 
Public destructor Destroy; override;
 
Public function findSchema(const namespace: string): TXSSchema;
 
Public function findNamespace(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): INamespace;
 
Public function findNamespaceURL(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): string;
 
Public function findNamespaceURLMandatory(const nsprefix: string; const defaultNamespaceKind: TXQDefaultNamespaceKind): string;
 
Public procedure splitRawQName(out namespace: INamespace; var name: string; const defaultNamespaceKind: TXQDefaultNamespaceKind);
 
Public procedure splitRawQName(out namespace: string; var name: string; const defaultNamespaceKind: TXQDefaultNamespaceKind);
 
Public function resolveDocURI(url: string): string;
 
Public function retrieveFromURI(url: string; out contenttype: string; failErrCode: string): string;
 
Public function retrieveFromFile(url: string; out contenttype: string; failErrCode: string): string;
 
Public function ImplicitTimezoneInMinutes: integer; inline;
 
Public function CurrentDateTime: TDateTime; inline;
 
Public function findModule(const namespaceURL: string): TXQuery;
 
Public function findModuleStaticContext(const namespaceURL: string): TXQStaticContext;
 
Public function findFunction(const anamespace, alocalname: string; const argcount: integer): TXQValueFunction;
 
Public function findVariableDeclaration( v: TXQTermVariable): TXQTermDefineVariable;
 
Public function findVariableDeclaration(const namespace, varname: string): TXQTermDefineVariable;
 
Public function isLibraryModule: boolean;
 
Public function compareAtomic(a, b: TXQValue; overrideCollation: TXQCollation): integer;

Compares two values atomically (eq,ne,..) and returns 0 if equal, -1 for a < b, and +1 for a > b; -2 for unknown

Public function compareAtomic(const a, b: IXQValue; overrideCollation: TXQCollation = nil): integer; inline;

Compares two values atomically (eq,ne,..) and returns 0 if equal, -1 for a < b, and +1 for a > b; -2 for unknown

Public procedure compareAtomic(const a, b: IXQValue; out result: IXQValue; accept1: integer; accept2: integer = 9999);
 
Public function equalAtomic(a, b: TXQValue; overrideCollation: TXQCollation): boolean;
 
Public function equalAtomic(const a, b: IXQValue; overrideCollation: TXQCollation): boolean;
 
Public function compareGeneral(a, b: TXQValue; overrideCollation: TXQCollation; accept1: integer; accept2: integer = 9999): boolean;

Compares two values (=,!=,...) and returns true if the compare value is \in [accept1,accept2]
(Remember that these xpath comparison operators search for a matching pair in the product of the sequences)

Public function compareGeneral(a, b: IXQValue; overrideCollation: TXQCollation; accept1: integer; accept2: integer = 9999): boolean;

Compares two values (=,!=,...) and returns true if the compare value is \in [accept1,accept2]
(Remember that these xpath comparison operators search for a matching pair in the product of the sequences)

Public procedure compareGeneral(a, b: IXQValue; out result: IXQValue; accept1: integer; accept2: integer = 9999);
 
Public function compareDeepAtomic(a, b: TXQValue; overrideCollation: TXQCollation): integer;

Compares two atomic values and returns 0 as the deepEqual function would if equal, -1 for a < b, and +1 for a > b; -2 for unknown

Public function compareDeepAtomic(const a, b: IXQValue; overrideCollation: TXQCollation): integer; inline;
 
Public function equalDeepAtomic(a, b: TXQValue; overrideCollation: TXQCollation): boolean;
 
Public function equalDeepAtomic(const a, b: IXQValue; overrideCollation: TXQCollation): boolean; inline;
 
Public class function comparableTypes(const a, b: TXQValue): boolean; static;

internally used (Returns if the eq operator is defined for the types of a and b)

Properties

Public property NodeCollation: TXQCollation read getNodeCollation write FNodeCollation;
 

Generated by PasDoc 0.14.0.