##register-api ( assembly-name, class-name, prefix )
This directive allows you to add a class as XSLT extension object.
- assembly-name - name of assembly where your API resides. Can be put in
Bin folder or in GAC.
- class-name - name of class including full namespace. This class MUST have parameterless constructor. All public instance methods of the class will be exposed as extension methods into XSLT.
- prefix - prefix name that will identify your class within XSLT code.
1. Define a class
2. Compile and copy XTest.dll to your site's Bin folder
public class XClass
public string SomeMethod()
return "I'm some method...";
Or, optionally, you can put the assembly into GAC.
3. Create XsltDb module and write the following
##register-api(XTest, XTest.XClass, some)