Instances of the class StaticContext contain the information that is available at the time the query is compiled. More...
#include <zorba/static_context.h>
Public Member Functions | |
virtual void | addCollation (const String &aURI)=0 |
Adds a collation URI. | |
virtual bool | addNamespace (const String &aPrefix, const String &aURI)=0 |
Add a pair (prefix, URI) to the statically known namespaces that are available during query compilation. | |
void | addReference () const |
virtual bool | containsFunction (const String &aFnNameUri, const String &aFnNameLocal, int arity) const =0 |
Check if a function with the given name and arity are registered in the context. | |
virtual StaticContext_t | createChildContext () const =0 |
Create a child static context, i.e. | |
virtual void | declareOption (const Item &aQName, const String &aOptionValue)=0 |
Declare an option (same as using declare option in XQuery) | |
virtual void | disableFunction (const Function_t &aFunction)=0 |
virtual void | disableFunction (const Item &aQName, int arity)=0 |
virtual void | findFunctions (const Item &aQName, std::vector< Function_t > &aFunctions) const =0 |
virtual void | free () |
virtual audit::Event * | getAuditEvent () const =0 |
gets the audit event that is populated during execution | |
virtual String | getBaseURI () const =0 |
Get the base URI. | |
virtual boundary_space_mode_t | getBoundarySpacePolicy () const =0 |
Get the boundary space policy. | |
virtual TypeIdentifier_t | getCollectionType (const String &aCollectionUri) const =0 |
Get the type of a statically known collection. | |
virtual construction_mode_t | getConstructionMode () const =0 |
Get the construction mode. | |
virtual TypeIdentifier_t | getContextItemStaticType () const =0 |
Fetch the type of the context item. | |
virtual void | getCopyNamespacesMode (preserve_mode_t &aPreserve, inherit_mode_t &aInherit) const =0 |
Get the copy namespace mode. | |
virtual String | getDefaultCollation () const =0 |
Get the URI of the default collation. | |
virtual String | getDefaultElementAndTypeNamespace () const =0 |
Get the default element and type namespace URI. | |
virtual String | getDefaultFunctionNamespace () const =0 |
Get the default function namespace. | |
virtual order_empty_mode_t | getDefaultOrderForEmptySequences () const =0 |
Get the default order for the empty sequence. | |
virtual TypeIdentifier_t | getDocumentType (const String &aDocUri) const =0 |
Get the type of a statically known document. | |
virtual void | getExternalVariables (Iterator_t &aVarsIter) const =0 |
Returns the QName of all external variables within the static context. | |
virtual void | getFullLibPath (std::vector< String > &aLibPath) const =0 |
Return the URI lookup path (list of filesystem directories) for this static context and all its parents. | |
virtual void | getFullModulePaths (std::vector< String > &aFullModulePaths) const =0 |
Return the union of the URI and library lookup paths (lists of filesystem directories) for this static context and all its parents. | |
virtual void | getFullURIPath (std::vector< String > &aURIPath) const =0 |
Return the URI lookup path (list of filesystem directories) for this static context and all its parents. | |
virtual void | getFunctionAnnotations (const Item &aQName, int arity, std::vector< Annotation_t > &aAnnotations) const =0 |
virtual void | getLibPath (std::vector< String > &aLibPath) const =0 |
Return the URI lookup path (list of filesystem directories) for this static context. | |
virtual void | getModulePaths (std::vector< String > &aModulePaths) const =0 |
Return the union of the URI and library lookup paths (lists of filesystem directories) for this static context. | |
virtual String | getNamespaceURIByPrefix (const String &aPrefix) const =0 |
Get the namespace URI for a given prefix. | |
virtual bool | getOption (const Item &aQName, String &aOptionValue) const =0 |
Get an option that was declared using the declare option syntax. | |
virtual ordering_mode_t | getOrderingMode () const =0 |
Get the ordering mode. | |
long | getRefCount () const |
virtual validation_mode_t | getRevalidationMode () const =0 |
Get the revalidation mode. | |
virtual StaticCollectionManager * | getStaticCollectionManager () const =0 |
Returns a CollectionManager responsible for all collections which are statically declared in this static context. | |
virtual void | getURIPath (std::vector< String > &aURIPath) const =0 |
Return the URI lookup path (list of filesystem directories) for this static context. | |
virtual xpath1_0compatib_mode_t | getXPath1_0CompatibMode () const =0 |
Get the XPath 1.0 compatibility mode. | |
virtual xquery_version_t | getXQueryVersion () const =0 |
Get the XQuery processing mode (version 1.0 or 3.0). | |
virtual ItemSequence_t | invoke (const Item &aQName, const std::vector< ItemSequence_t > &aArgs) const =0 |
Invokes the XQuery function with the given name and the given parameters. | |
virtual void | loadProlog (const String &, const Zorba_CompilerHints_t &hints)=0 |
Loads the declarations and definitions of a given XQuery prolog into this static context. | |
virtual bool | registerModule (ExternalModule *aModule)=0 |
Register a module providing access to external functions. | |
virtual void | registerURIMapper (URIMapper *aMapper)=0 |
Register a URI Mapper which will transform a given URI into several alternate potential URIs. | |
virtual void | registerURLResolver (URLResolver *aResolver)=0 |
Register a URL Resolver which will transform a given URL into a Resource. | |
void | removeReference () |
virtual void | resetTraceStream ()=0 |
Resets the output stream that is used by the fn:trace function to std::cerr. | |
virtual String | resolve (const String &aRelativeUri) const =0 |
Resolves the given URI against the value of the base-uri property from the static context. | |
virtual String | resolve (const String &aRelativeUri, const String &aBaseUri) const =0 |
Resolves the given relative URI against the absolute base URI. | |
virtual void | setAuditEvent (audit::Event *anEvent)=0 |
sets the audit event that will be populated during execution | |
virtual bool | setBaseURI (const String &aBaseURI)=0 |
Set the base URI. | |
virtual bool | setBoundarySpacePolicy (boundary_space_mode_t aMode)=0 |
Set the boundary space policy. | |
virtual void | setCollectionType (const String &aCollectionUri, TypeIdentifier_t type)=0 |
Set the type of a statically known collection. | |
virtual bool | setConstructionMode (construction_mode_t aMode)=0 |
Set the construction mode. | |
virtual void | setContextItemStaticType (TypeIdentifier_t type)=0 |
Set the type of the context item. | |
virtual bool | setCopyNamespacesMode (preserve_mode_t aPreserve, inherit_mode_t aInherit)=0 |
Set the copy namespace mode. | |
virtual void | setDefaultCollation (const String &aURI)=0 |
Set the URI of the default collation. | |
virtual bool | setDefaultElementAndTypeNamespace (const String &aURI)=0 |
Set the default element and type namespace (see http://www.w3.org/TR/xquery/#static_context) | |
virtual bool | setDefaultFunctionNamespace (const String &aURI)=0 |
Set the default functionnamespace (see http://www.w3.org/TR/xquery/#static_context) | |
virtual bool | setDefaultOrderForEmptySequences (order_empty_mode_t aMode)=0 |
Set the default order for the empty sequence. | |
virtual void | setDocumentType (const String &aDocUri, TypeIdentifier_t type)=0 |
Set the type of a statically known document. | |
virtual void | setLibPath (const std::vector< String > &aLibPath)=0 |
Set the library lookup path (list of filesystem directories) for this static context. | |
virtual void | setModulePaths (const std::vector< String > &aModulePaths)=0 |
Set the URI and library lookup paths (lists of filesystem directories) for this static context. | |
virtual bool | setOrderingMode (ordering_mode_t aMode)=0 |
Set the ordering mode. | |
virtual void | setRevalidationMode (validation_mode_t aMode)=0 |
Set the revalidation mode. | |
virtual void | setTraceStream (std::ostream &)=0 |
Set the output stream that is used by the fn:trace function. | |
virtual void | setURIPath (const std::vector< String > &aURIPath)=0 |
Set the URI lookup path (list of filesystem directories) for this static context. | |
virtual bool | setXPath1_0CompatibMode (xpath1_0compatib_mode_t aMode)=0 |
Set the XPath 1.0 compatibility mode. | |
virtual bool | setXQueryVersion (xquery_version_t aMode)=0 |
Set the XQuery processing mode (version 1.0 or 3.0). | |
virtual bool | validate (const Item &rootElement, Item &validatedResult, const String &targetNamespace, validation_mode_t validationMode=validate_strict) const =0 |
Validates this Item while loading the schema for targetNamespace Note: works only on document or element nodes, otherwise returns false. | |
virtual bool | validate (const Item &rootElement, Item &validatedResult, validation_mode_t validationMode=validate_strict) const =0 |
Validates this Item. | |
virtual bool | validateSimpleContent (const String &stringValue, const Item &typeQName, std::vector< Item > &resultList) const =0 |
Validates stringValue as XML simple content, i.e. | |
virtual | ~StaticContext () |
Destructor. | |
Protected Attributes | |
unsigned int | theRefCount |
Instances of the class StaticContext contain the information that is available at the time the query is compiled.
This class contains the information that is defined in the XQuery specification (see http://www.w3.org/TR/xquery/#static_context).
A StaticContext can be created by calling Zorba::createStaticContext and then be passed to the Zorba::compileQuery or XQuery::compile functions. If no static context has been passed to any of these functions, a default static context is used. It can be accessed by calling XQuery::getStaticContext on a compiled XQuery object.
Note: This class is reference counted. When writing multi-threaded clients, it is the responibility of the client code to synchronize assignments to the SmartPtr holding this object.
Definition at line 50 of file static_context.h.
virtual zorba::StaticContext::~StaticContext | ( | ) | [inline, virtual] |
Destructor.
Definition at line 55 of file static_context.h.
virtual void zorba::StaticContext::addCollation | ( | const String & | aURI | ) | [pure virtual] |
Adds a collation URI.
The URI specifies the locale and collation strength of the collation that is added. A valid collation URI must begin with http://www.zorba-xquery.com/collations/. This prefix is followed by a collation strength (i.e. PRIMARY, SECONDARY, TERTIARY, QUATTERNARY, or IDENTICAL) followed by a '/'. After the strength a lower-case two- or three-letter ISO-639 language code must follow. The URI may end with an upper-case two-letter ISO-3166. For example, http://www.zorba-xquery.com/collations/PRIMARY/en/US specifies an english language with US begin the country..
Internally, ICU is used for comparing strings. For detailed description see http://www.icu-project.org/apiref/icu4c/classCollator.html and http://www.icu-project.org/apiref/icu4c/classLocale.html
aURI | the URI of the collation. |
ZorbaException | if an error occured (e.g. the URI was not a valid collation URI). |
virtual bool zorba::StaticContext::addNamespace | ( | const String & | aPrefix, |
const String & | aURI | ||
) | [pure virtual] |
Add a pair (prefix, URI) to the statically known namespaces that are available during query compilation.
See http://www.w3.org/TR/xquery/#static_context.
ZorbaException | if an error occures. |
void zorba::SmartObject::addReference | ( | ) | const [inline, inherited] |
Definition at line 40 of file smart_ptr.h.
virtual bool zorba::StaticContext::containsFunction | ( | const String & | aFnNameUri, |
const String & | aFnNameLocal, | ||
int | arity | ||
) | const [pure virtual] |
Check if a function with the given name and arity are registered in the context.
virtual StaticContext_t zorba::StaticContext::createChildContext | ( | ) | const [pure virtual] |
Create a child static context, i.e.
a context with the same information, of the given static context.
A child static context carries the same context as it's parent but can override any information.
virtual void zorba::StaticContext::declareOption | ( | const Item & | aQName, |
const String & | aOptionValue | ||
) | [pure virtual] |
Declare an option (same as using declare option in XQuery)
aQName | The QName of the option to declare. |
aOptionValue | The value of the option to declare. |
virtual void zorba::StaticContext::disableFunction | ( | const Function_t & | aFunction | ) | [pure virtual] |
virtual void zorba::StaticContext::disableFunction | ( | const Item & | aQName, |
int | arity | ||
) | [pure virtual] |
virtual void zorba::StaticContext::findFunctions | ( | const Item & | aQName, |
std::vector< Function_t > & | aFunctions | ||
) | const [pure virtual] |
virtual void zorba::SmartObject::free | ( | ) | [virtual, inherited] |
virtual audit::Event* zorba::StaticContext::getAuditEvent | ( | ) | const [pure virtual] |
gets the audit event that is populated during execution
virtual String zorba::StaticContext::getBaseURI | ( | ) | const [pure virtual] |
Get the base URI.
virtual boundary_space_mode_t zorba::StaticContext::getBoundarySpacePolicy | ( | ) | const [pure virtual] |
Get the boundary space policy.
(see http://www.w3.org/TR/xquery/#static_context)
virtual TypeIdentifier_t zorba::StaticContext::getCollectionType | ( | const String & | aCollectionUri | ) | const [pure virtual] |
Get the type of a statically known collection.
virtual construction_mode_t zorba::StaticContext::getConstructionMode | ( | ) | const [pure virtual] |
Get the construction mode.
(see http://www.w3.org/TR/xquery/#static_context)
virtual TypeIdentifier_t zorba::StaticContext::getContextItemStaticType | ( | ) | const [pure virtual] |
Fetch the type of the context item.
virtual void zorba::StaticContext::getCopyNamespacesMode | ( | preserve_mode_t & | aPreserve, |
inherit_mode_t & | aInherit | ||
) | const [pure virtual] |
Get the copy namespace mode.
(see http://www.w3.org/TR/xquery/#static_context)
virtual String zorba::StaticContext::getDefaultCollation | ( | ) | const [pure virtual] |
Get the URI of the default collation.
virtual String zorba::StaticContext::getDefaultElementAndTypeNamespace | ( | ) | const [pure virtual] |
Get the default element and type namespace URI.
ZorbaException | if an error occured. |
virtual String zorba::StaticContext::getDefaultFunctionNamespace | ( | ) | const [pure virtual] |
Get the default function namespace.
ZorbaException | if an error occured. |
virtual order_empty_mode_t zorba::StaticContext::getDefaultOrderForEmptySequences | ( | ) | const [pure virtual] |
Get the default order for the empty sequence.
(see http://www.w3.org/TR/xquery/#static_context)
virtual TypeIdentifier_t zorba::StaticContext::getDocumentType | ( | const String & | aDocUri | ) | const [pure virtual] |
Get the type of a statically known document.
virtual void zorba::StaticContext::getExternalVariables | ( | Iterator_t & | aVarsIter | ) | const [pure virtual] |
Returns the QName of all external variables within the static context.
aVarsIter | iterator to store the results. |
ZorbaException | if an error occured. |
virtual void zorba::StaticContext::getFullLibPath | ( | std::vector< String > & | aLibPath | ) | const [pure virtual] |
Return the URI lookup path (list of filesystem directories) for this static context and all its parents.
virtual void zorba::StaticContext::getFullModulePaths | ( | std::vector< String > & | aFullModulePaths | ) | const [pure virtual] |
Return the union of the URI and library lookup paths (lists of filesystem directories) for this static context and all its parents.
virtual void zorba::StaticContext::getFullURIPath | ( | std::vector< String > & | aURIPath | ) | const [pure virtual] |
Return the URI lookup path (list of filesystem directories) for this static context and all its parents.
virtual void zorba::StaticContext::getFunctionAnnotations | ( | const Item & | aQName, |
int | arity, | ||
std::vector< Annotation_t > & | aAnnotations | ||
) | const [pure virtual] |
virtual void zorba::StaticContext::getLibPath | ( | std::vector< String > & | aLibPath | ) | const [pure virtual] |
Return the URI lookup path (list of filesystem directories) for this static context.
Returns any values set by on this static context. To return the full library lookup path for this static context and all its parents (usually most useful), call getFullLibPath().
virtual void zorba::StaticContext::getModulePaths | ( | std::vector< String > & | aModulePaths | ) | const [pure virtual] |
Return the union of the URI and library lookup paths (lists of filesystem directories) for this static context.
Returns any values set by and/or setURIPath() on this static context.
virtual String zorba::StaticContext::getNamespaceURIByPrefix | ( | const String & | aPrefix | ) | const [pure virtual] |
Get the namespace URI for a given prefix.
aPrefix | the prefix for which to retrieve the namespace URI. |
ZorbaException | if an error occured (e.g. no URI could be found for the given prefix). |
virtual bool zorba::StaticContext::getOption | ( | const Item & | aQName, |
String & | aOptionValue | ||
) | const [pure virtual] |
Get an option that was declared using the declare option syntax.
aQName | The QName of the option to get. |
aOptionValue | The value of the option if found. |
virtual ordering_mode_t zorba::StaticContext::getOrderingMode | ( | ) | const [pure virtual] |
Get the ordering mode.
(see http://www.w3.org/TR/xquery/#static_context)
long zorba::SmartObject::getRefCount | ( | ) | const [inline, inherited] |
Definition at line 38 of file smart_ptr.h.
virtual validation_mode_t zorba::StaticContext::getRevalidationMode | ( | ) | const [pure virtual] |
Get the revalidation mode.
virtual StaticCollectionManager* zorba::StaticContext::getStaticCollectionManager | ( | ) | const [pure virtual] |
Returns a CollectionManager responsible for all collections which are statically declared in this static context.
The collection manager provides a set of functions for managing collections and their contents.
virtual void zorba::StaticContext::getURIPath | ( | std::vector< String > & | aURIPath | ) | const [pure virtual] |
Return the URI lookup path (list of filesystem directories) for this static context.
Returns any values set by on this static context. To return the full URI lookup path for this static context and all its parents (usually most useful), call getFullURIPath().
virtual xpath1_0compatib_mode_t zorba::StaticContext::getXPath1_0CompatibMode | ( | ) | const [pure virtual] |
Get the XPath 1.0 compatibility mode.
(see http://www.w3.org/TR/xquery/#static_context)
virtual xquery_version_t zorba::StaticContext::getXQueryVersion | ( | ) | const [pure virtual] |
virtual ItemSequence_t zorba::StaticContext::invoke | ( | const Item & | aQName, |
const std::vector< ItemSequence_t > & | aArgs | ||
) | const [pure virtual] |
Invokes the XQuery function with the given name and the given parameters.
Note that the function to be invoked needs to be declared in this static context. In order to declare a function in the static context, the loadProlog method of this class can be used.
Also note that if the function to be invoked is an updating function, its resulting pending update list is implicitly applied by this function.
aQName | the name of the function to be invoked |
aArgs | a vector of ItemSequences. One entry in the vector corresponds to one argument that is passed to the function. |
virtual void zorba::StaticContext::loadProlog | ( | const String & | , |
const Zorba_CompilerHints_t & | hints | ||
) | [pure virtual] |
Loads the declarations and definitions of a given XQuery prolog into this static context.
This function compiles the prolog passed as first parameter and loads all declarations and definitions into this static context.
The static context extended by this prolog can then be used for creating a compiling a new query.
A StaticException is raised if the prolog could not be compiled or if the prolog does not contain valid declarations (e.g. duplicate declarations).
virtual bool zorba::StaticContext::registerModule | ( | ExternalModule * | aModule | ) | [pure virtual] |
Register a module providing access to external functions.
Register a module that provides access to external functions. The caller keeps the ownership of the Module and the StatelessExternalFunction objects passed to this function.
aModule | the module object |
virtual void zorba::StaticContext::registerURIMapper | ( | URIMapper * | aMapper | ) | [pure virtual] |
Register a URI Mapper which will transform a given URI into several alternate potential URIs.
QQQ doc
virtual void zorba::StaticContext::registerURLResolver | ( | URLResolver * | aResolver | ) | [pure virtual] |
Register a URL Resolver which will transform a given URL into a Resource.
QQQ doc
void zorba::SmartObject::removeReference | ( | ) | [inline, inherited] |
Definition at line 42 of file smart_ptr.h.
virtual void zorba::StaticContext::resetTraceStream | ( | ) | [pure virtual] |
Resets the output stream that is used by the fn:trace function to std::cerr.
Resolves the given URI against the value of the base-uri property from the static context.
aRelativeUri | The relative URI to be resolved. |
virtual String zorba::StaticContext::resolve | ( | const String & | aRelativeUri, |
const String & | aBaseUri | ||
) | const [pure virtual] |
Resolves the given relative URI against the absolute base URI.
aRelativeUri | The relative URI to be resolved. |
aBaseUri | The absolute URI against which the resolving is performed. |
virtual void zorba::StaticContext::setAuditEvent | ( | audit::Event * | anEvent | ) | [pure virtual] |
sets the audit event that will be populated during execution
anEvent | the audit event |
Set the base URI.
(see http://www.w3.org/TR/xquery/#static_context)
aBaseURI | the base URI as String. |
virtual bool zorba::StaticContext::setBoundarySpacePolicy | ( | boundary_space_mode_t | aMode | ) | [pure virtual] |
Set the boundary space policy.
(see http://www.w3.org/TR/xquery/#static_context)
aMode | the boundary space policy. |
virtual void zorba::StaticContext::setCollectionType | ( | const String & | aCollectionUri, |
TypeIdentifier_t | type | ||
) | [pure virtual] |
Set the type of a statically known collection.
virtual bool zorba::StaticContext::setConstructionMode | ( | construction_mode_t | aMode | ) | [pure virtual] |
Set the construction mode.
(see http://www.w3.org/TR/xquery/#static_context)
aMode | the construction mode. |
virtual void zorba::StaticContext::setContextItemStaticType | ( | TypeIdentifier_t | type | ) | [pure virtual] |
Set the type of the context item.
virtual bool zorba::StaticContext::setCopyNamespacesMode | ( | preserve_mode_t | aPreserve, |
inherit_mode_t | aInherit | ||
) | [pure virtual] |
Set the copy namespace mode.
(see http://www.w3.org/TR/xquery/#static_context)
aPreserve | the preserve mode. |
aInherit | the inherit mode. |
virtual void zorba::StaticContext::setDefaultCollation | ( | const String & | aURI | ) | [pure virtual] |
Set the URI of the default collation.
(see http://www.w3.org/TR/xquery/#static_context)
aURI | URI of the default collation. |
ZorbaException | if an error occured (e.g., the URI does not identify a collation among the statically known collations. |
virtual bool zorba::StaticContext::setDefaultElementAndTypeNamespace | ( | const String & | aURI | ) | [pure virtual] |
Set the default element and type namespace (see http://www.w3.org/TR/xquery/#static_context)
aURI | of the default element and type namespace URI. |
ZorbaException | if an error occured. |
virtual bool zorba::StaticContext::setDefaultFunctionNamespace | ( | const String & | aURI | ) | [pure virtual] |
Set the default functionnamespace (see http://www.w3.org/TR/xquery/#static_context)
aURI | of the default function namespace. |
ZorbaException | if an error occured. |
virtual bool zorba::StaticContext::setDefaultOrderForEmptySequences | ( | order_empty_mode_t | aMode | ) | [pure virtual] |
Set the default order for the empty sequence.
(see http://www.w3.org/TR/xquery/#static_context)
aMode | the default order for the empty sequence. |
virtual void zorba::StaticContext::setDocumentType | ( | const String & | aDocUri, |
TypeIdentifier_t | type | ||
) | [pure virtual] |
Set the type of a statically known document.
virtual void zorba::StaticContext::setLibPath | ( | const std::vector< String > & | aLibPath | ) | [pure virtual] |
Set the library lookup path (list of filesystem directories) for this static context.
Queries which import modules that have external function implementations will look for the implementation of those functions (shared libraries) in these directories.
virtual void zorba::StaticContext::setModulePaths | ( | const std::vector< String > & | aModulePaths | ) | [pure virtual] |
Set the URI and library lookup paths (lists of filesystem directories) for this static context.
Note that calling this method will override any values previously passed to and setLibPath(). deprecated 1. Convenience method which adds the listed directories to both the URI path and Library path for this static context.
virtual bool zorba::StaticContext::setOrderingMode | ( | ordering_mode_t | aMode | ) | [pure virtual] |
Set the ordering mode.
(see http://www.w3.org/TR/xquery/#static_context)
aMode | the ordering mode. |
virtual void zorba::StaticContext::setRevalidationMode | ( | validation_mode_t | aMode | ) | [pure virtual] |
Set the revalidation mode.
aMode | the revalidation mode. |
virtual void zorba::StaticContext::setTraceStream | ( | std::ostream & | ) | [pure virtual] |
Set the output stream that is used by the fn:trace function.
Sets the output stream that is used by the fn:trace function to the given output stream. The default stream is std::cerr.
virtual void zorba::StaticContext::setURIPath | ( | const std::vector< String > & | aURIPath | ) | [pure virtual] |
Set the URI lookup path (list of filesystem directories) for this static context.
Queries which resolve URIs (for instance, importing modules or schemas) will look in these directories.
virtual bool zorba::StaticContext::setXPath1_0CompatibMode | ( | xpath1_0compatib_mode_t | aMode | ) | [pure virtual] |
Set the XPath 1.0 compatibility mode.
(see http://www.w3.org/TR/xquery/#static_context)
aMode | the XPath 1.0 compatibility mode. |
virtual bool zorba::StaticContext::setXQueryVersion | ( | xquery_version_t | aMode | ) | [pure virtual] |
virtual bool zorba::StaticContext::validate | ( | const Item & | rootElement, |
Item & | validatedResult, | ||
const String & | targetNamespace, | ||
validation_mode_t | validationMode = validate_strict |
||
) | const [pure virtual] |
Validates this Item while loading the schema for targetNamespace Note: works only on document or element nodes, otherwise returns false.
rootElement | the root of the tree beeing validated |
validatedResult | the result of the validation |
targetNamespace | the expected namespace of root of the tree beeing validated ??? |
validationMode | Validation mode: default value is validate_strict |
ZorbaException | if any validation error occured |
virtual bool zorba::StaticContext::validate | ( | const Item & | rootElement, |
Item & | validatedResult, | ||
validation_mode_t | validationMode = validate_strict |
||
) | const [pure virtual] |
Validates this Item.
Note: works only on document and element nodes, otherwise returns false.
rootElement | the root of the tree beeing validated |
validatedResult | the result of the validation |
validationMode | Validation mode: default value is validate_strict |
ZorbaException | if any validation error occured |
virtual bool zorba::StaticContext::validateSimpleContent | ( | const String & | stringValue, |
const Item & | typeQName, | ||
std::vector< Item > & | resultList | ||
) | const [pure virtual] |
Validates stringValue as XML simple content, i.e.
the text value of attributes or text only element content.
stringValue | the value to be validated |
typeQName | |
resultList | the result of the validation, a vector of atomic Items |
ZorbaException | if any validation error occured |
unsigned int zorba::SmartObject::theRefCount [mutable, protected, inherited] |
Definition at line 27 of file smart_ptr.h.