Project

Profile

Help

RE: StaticContext.Processor in SaxonCS ExtensionFunctionC... » Example1Function.cs

Martin Honnen, 2022-08-16 09:07

 
using Saxon.Api;

namespace SaxonCSExtensionStaticContextTestLib
{
public class Example1Function : ExtensionFunctionDefinition
{
public override QName FunctionName => new QName("http://example.com/mf", "parse-xml");

public override int MinimumNumberOfArguments => 1;

public override int MaximumNumberOfArguments => 1;

public override XdmSequenceType[] ArgumentTypes => new XdmSequenceType[] {
new XdmSequenceType(XdmAtomicType.BuiltInAtomicType(QName.XS_STRING), XdmSequenceType.ONE)
};

public override ExtensionFunctionCall MakeFunctionCall()
{
return new Example1FunctionCall();
}

public override XdmSequenceType ResultType(XdmSequenceType[] ArgumentTypes)
{
return new XdmSequenceType(XdmAnyNodeType.Instance, XdmSequenceType.ONE);
}
}
}
(1-1/2)