<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Pxp_reader.resolve_to_url_obj_channel.html"> <link rel="next" href="Pxp_reader.lookup_id.html"> <link rel="Up" href="Pxp_reader.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of class methods" rel=Appendix href="index_methods.html"> <link title="Index of classes" rel=Appendix href="index_classes.html"> <link title="Index of class types" rel=Appendix href="index_class_types.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Index of module types" rel=Appendix href="index_module_types.html"> <link title="Pxp_types" rel="Chapter" href="Pxp_types.html"> <link title="Pxp_document" rel="Chapter" href="Pxp_document.html"> <link title="Pxp_dtd" rel="Chapter" href="Pxp_dtd.html"> <link title="Pxp_tree_parser" rel="Chapter" href="Pxp_tree_parser.html"> <link title="Pxp_core_types" rel="Chapter" href="Pxp_core_types.html"> <link title="Pxp_ev_parser" rel="Chapter" href="Pxp_ev_parser.html"> <link title="Pxp_event" rel="Chapter" href="Pxp_event.html"> <link title="Pxp_dtd_parser" rel="Chapter" href="Pxp_dtd_parser.html"> <link title="Pxp_codewriter" rel="Chapter" href="Pxp_codewriter.html"> <link title="Pxp_marshal" rel="Chapter" href="Pxp_marshal.html"> <link title="Pxp_yacc" rel="Chapter" href="Pxp_yacc.html"> <link title="Pxp_reader" rel="Chapter" href="Pxp_reader.html"> <link title="Intro_trees" rel="Chapter" href="Intro_trees.html"> <link title="Intro_extensions" rel="Chapter" href="Intro_extensions.html"> <link title="Intro_namespaces" rel="Chapter" href="Intro_namespaces.html"> <link title="Intro_events" rel="Chapter" href="Intro_events.html"> <link title="Intro_resolution" rel="Chapter" href="Intro_resolution.html"> <link title="Intro_getting_started" rel="Chapter" href="Intro_getting_started.html"> <link title="Intro_advanced" rel="Chapter" href="Intro_advanced.html"> <link title="Intro_preprocessor" rel="Chapter" href="Intro_preprocessor.html"> <link title="Example_readme" rel="Chapter" href="Example_readme.html"><title>PXP Reference : Pxp_reader.resolve_as_file</title> </head> <body> <div class="navbar"><a href="Pxp_reader.resolve_to_url_obj_channel.html">Previous</a> <a href="Pxp_reader.html">Up</a> <a href="Pxp_reader.lookup_id.html">Next</a> </div> <center><h1>Class <a href="type_Pxp_reader.resolve_as_file.html">Pxp_reader.resolve_as_file</a></h1></center> <br> <pre><span class="keyword">class</span> <a name="TYPEresolve_as_file"></a>resolve_as_file : <code class="type">?file_prefix:[ `Allowed | `Not_recognized | `Required ] -> ?host_prefix:[ `Allowed | `Not_recognized | `Required ] -> ?system_encoding:<a href="Pxp_types.html#TYPEencoding">Pxp_types.encoding</a> -> ?map_private_id:<a href="Pxp_types.html#TYPEprivate_id">Pxp_types.private_id</a> -> Neturl.url -> ?open_private_id:<a href="Pxp_types.html#TYPEprivate_id">Pxp_types.private_id</a> -><br> Pervasives.in_channel * <a href="Pxp_types.html#TYPEencoding">Pxp_types.encoding</a> option -> ?base_url_defaults_to_cwd:bool -> ?not_resolvable_if_not_found:bool -> unit -> </code><code class="type"><a href="Pxp_reader.resolver.html">resolver</a></code></pre>Reads from the local file system. <code class="code">file</code> URL's are interpreted as file names of the local file system, and the referenced files are opened. <p> The full form of a file URL is: <code class="code">file://host/path</code>, where <code class="code">host</code> specifies the host system where the file identified <code class="code">path</code> resides. <code class="code">host=<span class="string">""</span></code> or <code class="code">host=<span class="string">"localhost"</span></code> are accepted; other values will raise <code class="code"><span class="constructor">Not_competent</span></code>. The standard for file URLs is defined in RFC 1738. <p> Option <code class="code">file_prefix</code>: Specifies how the <code class="code">file:</code> prefix of file names is handled:<ul> <li><code class="code"><span class="keywordsign">`</span><span class="constructor">Not_recognized</span></code>: The prefix is not recognized.</li> <li><code class="code"><span class="keywordsign">`</span><span class="constructor">Allowed</span></code>: The prefix is allowed but not required (the default).</li> <li><code class="code"><span class="keywordsign">`</span><span class="constructor">Required</span></code>: The prefix is required.</li> </ul> Option <code class="code">host_prefix</code>: Specifies how the <code class="code">//host</code> phrase of file names is handled:<ul> <li><code class="code"><span class="keywordsign">`</span><span class="constructor">Not_recognized</span></code>: The phrase is not recognized.</li> <li><code class="code"><span class="keywordsign">`</span><span class="constructor">Allowed</span></code>: The phrase is allowed but not required (the default).</li> <li><code class="code"><span class="keywordsign">`</span><span class="constructor">Required</span></code>: The phrase is required.</li> </ul> Option <code class="code">system_encoding</code>: Specifies the encoding of file names of the local file system. Default: UTF-8. <p> Options <code class="code">map_private_id</code> and <code class="code">open_private_id</code>: These options are deprecated and no longer described here. <p> Option <code class="code">base_url_defaults_to_cwd</code>: If true, relative URLs are interpreted relative to the current working directory at the time the class is instantiated, but only if there is no parent URL, i.e. <code class="code">rid_system_base=<span class="constructor">None</span></code>. If false (the default), such URLs cannot be resolved. In general, it is better to set this option to false, and to initialize <code class="code">rid_system_base</code> properly. <p> Option <code class="code">not_resolvable_if_not_found</code>: If true (the default), "File not found" errors stop the resolution process. If false, "File not found" is treated as <code class="code"><span class="constructor">Not_competent</span></code>.<br> <hr width="100%"> </body></html>