<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.hw-gettext" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>hw_GetText</refname>
  <refpurpose>Retrieve text document</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>int</type><methodname>hw_gettext</methodname>
   <methodparam><type>int</type><parameter>connection</parameter></methodparam>
   <methodparam><type>int</type><parameter>objectID</parameter></methodparam>
   <methodparam choice="opt"><type>mixed</type><parameter>rootID/prefix</parameter></methodparam>
  </methodsynopsis>
  <para>
   Returns the document with object ID <parameter>objectID</parameter>. If
   the document has anchors which can be inserted, they will be inserted
   already.
  </para>
  <para>
   This function will only work for pure text documents. It will not open a
   special data connection and therefore blocks the control connection during
   the transfer.
  </para>
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>connection</parameter></term>
     <listitem>
      <para>
       The connection identifier.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>objectID</parameter></term>
     <listitem>
      <para>
       The object identifier.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>rootID/prefix</parameter></term>
     <listitem>
      <para>
       The optional parameter <parameter>rootID/prefix</parameter> can be a
       string or an integer. If it is an integer it determines how links are
       inserted into the document. The default is 0 and will result in links
       that are constructed from the name of the link's destination object.
       This is useful for web applications. If a link points to an object
       with name 'internet_movie' the HTML link will be &lt;A
       href="/internet_movie">. The actual location of the source and
       destination object in the document hierarchy is disregarded. You
       will have to set up your web browser, to rewrite that URL to for
       example '/my_script.php/internet_movie'. 'my_script.php' will
       have to evaluate $PATH_INFO and retrieve the document.
       All links will have the prefix '/my_script.php/'. If you do not
       want this you can set the optional parameter
       <parameter>rootID/prefix</parameter> to any prefix which
       is used instead. Is this case it has to be a string.
      </para>
      <para>
       If <parameter>rootID/prefix</parameter> is an integer and unequal to 0
       the link is constructed from all the names starting at the object with
       the id <parameter>rootID/prefix</parameter> separated by a slash
       relative to the current object.
      </para>
      <para>
       If for example the above document 'internet_movie' is located
       at 'a-b-c-internet_movie' with '-' being the separator between
       hierarchy levels on the Hyperwave server and the source document is
       located at 'a-b-d-source' the resulting HTML link would be:
       &lt;A HREF="../c/internet_movie">. This is useful if you want
       to download the whole server content onto disk and map
       the document hierarchy onto the file system.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the text document.
  </para>
 </refsect1>
 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>hw_pipedocument</function></member>
    <member><function>hw_free_document</function></member>
    <member><function>hw_document_bodytag</function></member>
    <member><function>hw_document_size</function></member>
    <member><function>hw_output_document</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->