StaticContextSettings.Libraries PropertyStaticContextSettings.Libraries PropertyStaticContextSettings::Libraries Property
Syntax
Public Property Libraries As LibrarySet Get Set(ByVal value As LibrarySet)
public LibrarySet Libraries { get; set; }
public: property LibrarySet^ Libraries { LibrarySet^ get(); void set(LibrarySet^ value); }
Property Value
Type: XmlPrime.LibrarySetXmlPrime.LibrarySetXmlPrime::LibrarySet^
A LibrarySetLibrarySetLibrarySet containing libraries that are available to the query.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | An attempt is made to set this property to null
a null reference (Nothing in Visual Basic)
nullptr . |
Remarks
By default this is an empty collection. The default function libraries are added to the collection when the query or expression is compiled
In order to use a library it must be imported, either by using an import module
statement in the
query, or by using the ImportModule (string)ImportModule (String)ImportModule (String^) method.
If an import module
declaration in an XQuery program references a namespace which already has
corresponding modules in the library set, then these modules are used and the location hints are ignored.
Otherwise the location hints are resolved, and the resulting modules are added to the library set.
After compilation the library set also contains all modules that have been imported by the query (either by the main module or by another library module that has been imported). Sharing the library set amongst multiple queries will avoid additional libraries from being recompiled.