<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="extensibility" page="converting-args" subpage=""/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: Converting Arguments to Java Extension Functions</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Converting Arguments to Java Extension Functions"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Converting Arguments to Java Extension Functions</h1>
      <p>This section describes how XPath values supplied in a call to a Java extension function are converted to
Java values.</p>
      <p>There are three phases of decision-making:</p>
      <ul>
         <li content="para">
            <p>First, Saxon decides which method to call. If there are several methods with the same name, this takes
into account the static types of the supplied arguments and the Java types expected by the method signature. However,
this process does not influence how the arguments are subsequently converted.</p>
         </li>
         <li content="para">
            <p>Saxon allocates a converter, wherever possible at compile time, based on the static type of the supplied
argument and the Java type expected by the method.</p>
         </li>
         <li content="para">
            <p>At run-time the converter performs the conversion from the supplied value to the required type. Some converters
will make further decisions based on run-time types at this stage.</p>
         </li>
      </ul>
      <p>These stages are described further in the following pages.</p>
      <ul>
         <li>
            <p><a class="bodylink" href="converting-args/converting-arguments.xml">Converting Method Arguments - General Rules</a></p>
         </li>
         <li>
            <p><a class="bodylink" href="converting-args/converting-atomic.xml">Converting Atomic Values</a></p>
         </li>
         <li>
            <p><a class="bodylink" href="converting-args/converting-node.xml">Converting Nodes</a></p>
         </li>
         <li>
            <p><a class="bodylink" href="converting-args/converting-wrapped-java.xml">Converting Wrapped Java Objects</a></p>
         </li>
      </ul>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="converting-args/converting-arguments.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>