<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 15 (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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \;color\:\#1F497D";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2136243178;
        mso-list-type:hybrid;
        mso-list-template-ids:1714560396 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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 bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Superb, will try this Alexey, thank you so much.<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Alexey Gagarinov <agagarinov@renderx.com>
<br>
<b>Sent:</b> Tuesday, September 3, 2019 10:49 PM<br>
<b>To:</b> Harvey, Paul J. EOP/OMB (Contractor) <Paul_Harvey@omb.eop.gov><br>
<b>Cc:</b> xep-support@renderx.com<br>
<b>Subject:</b> [EXTERNAL] Re: [xep-support] Trying to use XSLT 2.0 in an XEP transformation<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Paul,<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">I am executing a shell script which contains something like this…</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-family:"Courier New ;color:#1F497D",serif">CP=$XEP_HOME/lib/xep.jar:$XEP_HOME/lib/saxon9.jar:$XEP_HOME/lib/xt.jar</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-family:"Courier New ;color:#1F497D",serif">$JAVA_HOME/bin/java -Xms64M  -Xmx1096M -cp $CP com.renderx.xep.XSLDriver $*</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-AU" style="font-family:"Courier New ;color:#1F497D",serif"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">…the stylesheet I pass to the script contains some XSLT 2.0 stuff (a function call) and this is producing an error of the form…</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New ;color:#1F497D",serif">The URI
<a href="%3ehttp:/uri-for-function-namespace%3c">>http://uri-for-function-namespace<</a> does not identify an external Java class</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">…which means, I think, that saxon9 is not being used even though I set it in the classpath. (I confirmed this by removing it from the classpath, and I get the same error.)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I confirmed that </span><span lang="EN-AU" style="font-family:"Courier New ;color:#1F497D",serif">$XEP_HOME/lib/saxon9.jar</span><span lang="EN-AU" style="color:#1F497D">
</span><span style="color:#1F497D">works with a simple XSLT 2.0 transformation run with directly with it.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span style="color:#1F497D">Does my reasoning sound correct?</span><o:p></o:p></p>
</blockquote>
<p>Yes<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span style="color:#1F497D"><br>
<br>
</span><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span style="color:#1F497D">How would I get the transformation to use saxon9 if setting it on the classpath is not working?</span><o:p></o:p></p>
</blockquote>
<p>Set the <code><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">javax.xml.transform.TransformerFactory</span></code> system property by adding the following key-value pair into the
 run script:<o:p></o:p></p>
<p><span lang="EN-AU" style="font-family:"Courier New";color:#1F497D">$JAVA_HOME/bin/java -Xms64M  -Xmx1096M -cp $CP -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl  com.renderx.xep.XSLDriver $*</span><o:p></o:p></p>
<p>It will force XEP to use Saxon 9 (if it exists as jar in the java classpath).<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">4)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span style="color:#1F497D">Any other things you’d suggest I look at to solve this?</span><o:p></o:p></p>
</blockquote>
<p>There are other methods to load a concrete XSLT Transformer in Java. See, for example,
<a href="%3ehttps:/stackoverflow.com/questions/29450535/what-is-the-default-transformerfactory%3c">
>https://stackoverflow.com/questions/29450535/what-is-the-default-transformerfactory<</a> for details.<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">5)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span style="color:#1F497D"><br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">FYI, I don’t with Java much, so my lack of knowledge there may be playing into this.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Paul</span><o:p></o:p></p>
</blockquote>
<p><o:p> </o:p></p>
<p>Regards,<o:p></o:p></p>
<p>  Alexey Gagarinov<o:p></o:p></p>
<p>RenderX<o:p></o:p></p>
</div>
</body>
</html>