<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="using-xquery" page="xquery11support" subpage="contextitem"/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: Declaring the Initial Context Item</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Declaring the Initial Context Item"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Declaring the Initial Context Item</h1>
      <p>The <code>declare context item</code> declaration in the query prolog is implemented. This allows a
required type and a default value to be declared for the context item.</p>
      <p>At present (the rules aren't entirely clear)
it is possible to specify a value from the calling API, or to not specify a value, regardless whether
"external" is specified or not.</p>
      <p>At present there is no interaction with the API facilities for defining
a required type for the context item: both can be used independently.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="higherorderfunctions.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>