Class DocumentBuilder
Class DomDestination
Class DynamicContext
Class DynamicError
Class EmptyEnumerator
Class ExtensionFunctionCall
Class NullDestination
Class Processor
Class QName
Class SchemaManager
Class SchemaValidator
Class Serializer
Class StaticContext
Class StaticError
Class TextWriterDestination
Class XPathCompiler
Class XPathExecutable
Class XPathSelector
Class XQueryCompiler
Class XQueryEvaluator
Class XQueryExecutable
Class XdmAnyFunctionType
Class XdmAnyItemType
Class XdmAnyNodeType
Class XdmAtomicType
Class XdmAtomicValue
Class XdmDestination
Class XdmEmptySequence
Class XdmItem
Class XdmItemType
Class XdmNode
Class XdmNodeKind
Class XdmSequenceType
Class XdmValue
Class XmlDestination
Class XsltCompiler
Class XsltExecutable
Class XsltTransformer
Enum RecoveryPolicy
Enum SchemaValidationMode
Enum TreeModel
Enum WhitespacePolicy
Enum XdmAxis
Interface IMessageListener
Interface IQueryResolver
Interface IResultDocumentHandler
Interface IXdmEnumerator
Interface IXmlLocation
Interface SchemaResolver
public abstract class ExtensionFunctionDefinition
Abstract superclass for user-written extension functions. An extension function may be implemented as a subclass of this class, with appropriate implementations of the defined methods.
More precisely, a subclass of ExtensionFunctionDefinition
identifies a family of extension functions
with the same (namespace-qualified) name but potentially having different arity (number of arguments).
Property Summary | |
---|---|
QName |
FunctionName Read-only property returning the name of the extension function, as a QName. |
int |
MinimumNumberOfArguments Read-only property giving the minimum number of arguments in a call to this extension function. |
int |
MaximumNumberOfArguments Read-only property giving the maximum number of arguments in a call to this extension function. |
XdmSequenceType[] |
ArgumentTypes
Read-only property giving the required types of the arguments to this extension function.
If the number of items in the array is less than the maximum number of arguments,
then the last entry in the returned ArgumentTypes is assumed to apply to all the rest;
if the returned array is empty, then all arguments are assumed to be of type |
Boolean |
TrustResultType This property may be set to true in a subclass if it guarantees that the returned result of the function will always be of the declared return type: setting this to true by-passes the run-time checking of the type of the value, together with code that would otherwise perform atomization, numeric type promotion, and similar conversions. If the value is set to true and the value is not of the correct type, the effect is unpredictable and probably disastrous. |
Boolean |
DependsOnFocus This property must be set to true in a subclass if the evaluation of the function makes use of the context item, position, or size from the dynamic context. This inhibits certain Saxon optimizations. |
Boolean |
HasSideEffects This property should be set to true in a subclass if the evaluation of the function has side-effects. Saxon never guarantees the result of calling functions with side-effects, but if this property is set, then certain aggressive optimizations will be avoided, making it more likely that the function behaves as expected. |
Method Summary | |
---|---|
XdmSequenceType |
ResultType(Saxon.Api.XdmSequenceType[] ArgumentTypes) Method returning the declared type of the return value from the function. The type of the return value may be known more precisely if the types of the arguments are known (for example, some functions return a value that is the same type as the first argument. The method is therefore called supplying the static types of the actual arguments present in the call. |
ExtensionFunctionCall |
MakeFunctionCall() Factory method to create an ExtensionFunctionCall object, representing a specific function call in the XSLT or XQuery source code. Saxon will call this method once it has identified that a specific call relates to this extension function. |
Property Detail |
---|
public QName FunctionName {}
Read-only property returning the name of the extension function, as a QName.
public int MinimumNumberOfArguments {}
Read-only property giving the minimum number of arguments in a call to this extension function.
public int MaximumNumberOfArguments {}
Read-only property giving the maximum number of arguments in a call to this extension function.
public XdmSequenceType[] ArgumentTypes {}
Read-only property giving the required types of the arguments to this extension function.
If the number of items in the array is less than the maximum number of arguments,
then the last entry in the returned ArgumentTypes is assumed to apply to all the rest;
if the returned array is empty, then all arguments are assumed to be of type item()*
public Boolean TrustResultType {}
This property may be set to true in a subclass if it guarantees that the returned result of the function will always be of the declared return type: setting this to true by-passes the run-time checking of the type of the value, together with code that would otherwise perform atomization, numeric type promotion, and similar conversions. If the value is set to true and the value is not of the correct type, the effect is unpredictable and probably disastrous.
public Boolean DependsOnFocus {}
This property must be set to true in a subclass if the evaluation of the function makes use of the context item, position, or size from the dynamic context. This inhibits certain Saxon optimizations.
public Boolean HasSideEffects {}
This property should be set to true in a subclass if the evaluation of the function has side-effects. Saxon never guarantees the result of calling functions with side-effects, but if this property is set, then certain aggressive optimizations will be avoided, making it more likely that the function behaves as expected.
Method Detail |
---|
public XdmSequenceType ResultType(Saxon.Api.XdmSequenceType[] ArgumentTypes)
Method returning the declared type of the return value from the function. The type of the return value may be known more precisely if the types of the arguments are known (for example, some functions return a value that is the same type as the first argument. The method is therefore called supplying the static types of the actual arguments present in the call.
Parameters:ArgumentTypes
-
XdmSequenceType
representing the declared return type of the extension function
public ExtensionFunctionCall MakeFunctionCall()
Factory method to create an ExtensionFunctionCall object, representing a specific function call in the XSLT or XQuery source code. Saxon will call this method once it has identified that a specific call relates to this extension function.
ExtensionFunctionCall