title: Error when calling java static method from xslt
body: <p>I'm trying to call from XSLT a static java code. My XSLT file looks as the following</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:ns1="interface.dev"
  exclude-result-prefixes="ns1"
   xmlns:xltxe="http://www.ibm.com/xmlns/prod/xltxe-j"
   xmlns:countryCode="http://com.abc/common/utils"&gt;
  
  &lt;xltxe:java-extension prefix="countryCode" class="com.abc.common.utils.CountryStaticInfo"/&gt;
  
  &lt;xsl:variable name="var" select="ns1:parties/ns1:party[@code='BNE']/ns1:country"/&gt;
  
  &lt;xsl:template match="/ns1:import_lc_iss"&gt;
    &lt;html&gt;
    &lt;body&gt;
      &lt;table border="1"&gt;
          &lt;tr&gt;
    &lt;xsl:value-of select="countryCode:getCountryCode($var)" /&gt;
        &lt;/tr&gt;
        &lt;/table&gt;
        &lt;/body&gt;
        &lt;/html&gt;
      &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>My Java code looks like that:</p>
  
  <pre><code>public synchronized static String getCountryCode(String aS_ctryCode) throws Exception, StaticInfoException {
  
      ArrayList lAL_entities = com.abc.services.JavaProgramContext.getServerEntities();
      return getCountryCode(lAL_entities.get(0).toString(),aS_ctryCode);
  }
  </code></pre>
  
  <p>I get the following error</p>
  
  <blockquote>
    <p>RROR:  'The first argument to the non-static Java function
    'getCountryCode' is not a valid object reference.<br>
        46860 [main] ERROR   - Cannot transform the recieved message via xslt 
        javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:828)
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:617)</p>
  </blockquote>
  
  <p>1st amendment:  the new xslt with xalan support</p>
  
  <pre><code>    &lt;xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:ns1="interface.dev"
      exclude-result-prefixes="ns1"
       xmlns:xalan="http://xml.apache.org/xalan"
       extension-element-prefixes="xalan" 
        xmlns:java="java"
        xmlns:util="com.abc.common.utils.CountryStaticInfo"&gt;
  
      &lt;xltxe:java-extension prefix="countryCode" class="com.abc.common.utils.CountryStaticInfo"/&gt;
  
   &lt;xsl:variable name="var" select="AU"/&gt;   
      &lt;xsl:template match="/ns1:import_lc_iss"&gt;
        &lt;html&gt;
        &lt;body&gt;
          &lt;table border="1"&gt;
              &lt;tr&gt;
        &lt;xsl:variable name="new-pop"     select="com.abc.common.utils.CountryStaticInfo.getCountryCode(string(@var))"/&gt;
            &lt;/tr&gt;
            &lt;/table&gt;
            &lt;/body&gt;
            &lt;/html&gt;
          &lt;/xsl:template&gt;
  
      &lt;/xsl:stylesheet&gt;
  </code></pre>