<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="functions" page="intro" subpage="unparsed-text-available"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: unparsed-text-available</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: unparsed-text-available"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>unparsed-text-available</h1>
      <p>Determines whether the corresponding call on <code>unparsed-text()</code> with the same arguments would succeed.
      </p>
      <p class="subhead">unparsed-text-available($href as xs:string?) &#8594; xs:boolean</p>
      <table>
         <tr>
            <td width="470" align="left" colspan="4" style="border-top:solid 1px #3D5B96; ">
               <p>
                     <i>Arguments</i>
                  </p>
            </td>
         </tr>
         <tr>
            <td width="40">
               <p> </p>
            </td>
            <td width="80" valign="top">
               <p>$href</p>
            </td>
            <td valign="top" width="150">
               <p>xs:string?</p>
            </td>
            <td valign="top" width="200">
               <p>The uri of the text file to be read</p>
            </td>
         </tr>
         <tr>
            <td colspan="2"
                style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;">
               <p>
                     <i>Result</i>
                  </p>
            </td>
            <td style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;"
                colspan="2">
               <p>xs:boolean</p>
            </td>
         </tr>
      </table>
      <p class="subhead">unparsed-text-available($href as xs:string?, $encoding as xs:string) &#8594; xs:boolean</p>
      <table>
         <tr>
            <td width="470" align="left" colspan="4" style="border-top:solid 1px #3D5B96; ">
               <p>
                     <i>Arguments</i>
                  </p>
            </td>
         </tr>
         <tr>
            <td width="40">
               <p> </p>
            </td>
            <td width="80" valign="top">
               <p>$href</p>
            </td>
            <td valign="top" width="150">
               <p>xs:string?</p>
            </td>
            <td valign="top" width="200">
               <p>The uri of the text file to be read</p>
            </td>
         </tr>
         <tr>
            <td width="40">
               <p> </p>
            </td>
            <td width="80" valign="top">
               <p>$encoding</p>
            </td>
            <td valign="top" width="150">
               <p>xs:string</p>
            </td>
            <td valign="top" width="200">
               <p>The encoding to be assumed for the text file</p>
            </td>
         </tr>
         <tr>
            <td colspan="2"
                style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;">
               <p>
                     <i>Result</i>
                  </p>
            </td>
            <td style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;"
                colspan="2">
               <p>xs:boolean</p>
            </td>
         </tr>
      </table>
      <p class="subhead">Links to W3C specifications</p>
      <p>Namespace: http://www.w3.org/2005/xpath-functions</p>
      <p>Applies to: XPath 3.0, XSLT 3.0, XQuery 3.0 (if enabled in Saxon: requires Saxon-PE or Saxon-EE)</p>
      <p>
            <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available"
            class="bodylink">XPath 3.0 Functions and Operators</a>
         </p>
      <p>
            <a href="http://www.w3.org/TR/xslt20/#function-unparsed-text-available"
            class="bodylink">XSLT 2.0 Specification</a>
         </p>
      <p class="subhead">Notes on the Saxon implementation</p>
      <p>The current Saxon implementation is not deterministic: if the function is called twice with the same
         argument, it will read the external file twice, and may return different results if it has changed; the
      fact that a file is available or unavailable does not guarantee that its status will remain unchanged for the
      rest of the query or transformation.</p>
      <p>&gt;The current implementation is inefficient: if a call on <code>unparsed-text-available()</code> is followed
    by a call on <code>unparsed-text()</code> to read the same file, the file will be read twice.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="unparsed-text-lines.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>