The Document domain is a [Tclhttpd Domain] which supports the delivery of mime-typed content files to a browser. [Tclhttpd] is surprisingly efficient at delivering files, because having located the content in a file system from a URL, it uses Tcl's [fcopy] command to simply deliver the content by means of the underlying Tcl Core (which is written in C.) The Document domain also supports a wide variety of content translation and negotiation, including powerful templates, substitution and caching. An instance of a Document domain is associated with a ''document root'', which is a directory within some tcl file system. ---- '''Pseudo Code Document Algorithm''' * Get path from URL 1. Translate URL suffix to file path 2. Check for personal home pages * Get content from path - these alternatives are tried in order 1. Look for a fresh template which generates the desired path 2. Look for an exact match to the requested file 3. Negotiate an Acceptable available alternative file and redirect to it 4. Fall back to check for cgi script in the middle of the path * Transform and return content according to type 1. a directory is handed off to the Dirlist module 2. a file transformed by a proc Doc_''$mimetype'', or just returned verbatim if no such proc exists ---- [Category Tclhttpd]