These would be simple xsl:function elements that I would put in an XSL file.
Ideally if the xsl:function would have documentation above it like:
Code: Select all
<xsldoc:desc>Add two params</xsldoc:desc>
<xsldoc:param name="p1">The first param</xsldoc:param>
<xsldoc:param name="p2">The second param</xsldoc:param>
<xsl:function name="abc:add" xmlns:abc="ns">
<xsl:value-of select="$p1 + $p2"/>
Oxygen should pick up the documentation and use it when proposing the function in the content completion window.
Right now it does not do that so I added an improvement request for it in our internal issues list.
Are these .xml files located in a folder somewhere or would I need to dig in a java archive?
Dig in the main JAR library I'm afraid, open the main "OXYGEN_INSTALL_DIR\lib\oxygen.jar", look for the folder "builtin/xsl-annotations/functions" and it has XML files used depending on the XSLT version.
You can extract such a file (for example xpath-30-functions.xml) outside of Oxygen, and if in the "OXYGEN_INSTALL_DIR\lib\" folder you create a folder structure like this "endorsed/builtin/xsl-annotations/functions/xpath-30-functions.xml", Oxygen should prefer loading the XML from the external location instead of its main JAR library.
Also I'm not sure if just adding the function description there will work or not, this needs to be tested.