<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>What you describe can easily be accomplished within the XML+XSL process (meaning XSLT transformation) to XSL FO (not within XSL FO itself).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>See this article and research calling Java classes from XSLT/Saxon:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://stackoverflow.com/questions/12761744/call-java-instance-methods-in-xslt">http://stackoverflow.com/questions/12761744/call-java-instance-methods-in-xslt</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kevin Brown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>RenderX<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> xep-support-bounces@renderx.com [mailto:xep-support-bounces@renderx.com] <b>On Behalf Of </b>Nicolas Dubien<br><b>Sent:</b> Wednesday, June 26, 2013 5:19 AM<br><b>To:</b> xep-support@renderx.com<br><b>Subject:</b> [xep-support] RenderX XEP Server : Using user-defined functions?<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Dear Sir or Madam,<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>I am looking for an XLS-FO engine that can fit with my current architecture. I am already using other engines which are based on other technologies - not-XSL-FO. In our current architecture we are using user-defined functions to add our proper features to the engine.<br><br>As a matter of fact, I was wondering if it is possible to integrate user-defined functions in my XSL-FO templates and define them in Java. Then your engine will call my Java function if necessary. I did not find any solutions to do this on your website.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Here are examples of functions I would like to be able to call from your engine during the generation:<br>&nbsp;* getResourceUrl(&quot;my resource name&quot;)<br>&nbsp;* ChangeCase($first_name_from_xml, &quot;Upper&quot;)<br>&nbsp;* GetId($first_name_from_xml, $last_name_from_xml)<o:p></o:p></p></div><div><p class=MsoNormal>One of the engines I am using for the moment is FreeMarker, it has this feature. It allows developers to wrap their own objects and send them to their engine.<o:p></o:p></p></div><div><p class=MsoNormal>cf. <a href="http://freemarker.sourceforge.net/docs/api/freemarker/template/Template.html#process%28java.lang.Object,%20java.io.Writer,%20freemarker.template.ObjectWrapper%29" target="_blank">http://freemarker.sourceforge.net/docs/api/freemarker/template/Template.html#process%28java.lang.Object,%20java.io.Writer,%20freemarker.template.ObjectWrapper%29</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal>I am looking forward to hearing from you,<o:p></o:p></p></div><p class=MsoNormal>Nicolas DUBIEN<o:p></o:p></p></div><p class=MsoNormal>!DSPAM:87,51cadc459852322311333! <o:p></o:p></p></div></body></html>