1. Registering custom spreadsheet functions with XXE

Custom spreadsheet functions must be defined in an XML document conforming to (XMLmind proprietary) W3C XML Schema having http://www.xmlmind.com/xmleditor/schema/spreadsheet/functions as its target namespace.

Example, myspreadsheetfunctions.xml (found in XXE_install_dir/doc/spreadsheet/custom_functions/)

<?xml version="1.0" encoding="ISO-8859-1"?>
<f:functions xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ns="http://www.w3.org/1999/xhtml"
             xmlns:f="http://www.xmlmind.com/xmleditor/schema/spreadsheet/functions">
  <f:function>
    <f:name>factorial</f:name>
    <f:parameters>n</f:parameters>
    <f:category>Mathematical</f:category>
    <f:description>
      <body>
        <p>Returns the factorial of <i>n</i>.</p>
      </body>
    </f:description>
    <f:macro><![CDATA[= if(n = 1, 1, n*factorial(n-1))]]></f:macro>
  </f:function>
</f:functions>

This XML document must be referenced in an XXE configuration file using configuration extension element com.xmlmind.xmleditext.spreadsheet.SpreadsheetFunctionsInfo. See Section 28, “Custom spreadsheet functions” in XMLmind XML Editor - Configuration and Deployment.