<!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.lookup_system_id_as_string.html"> <link rel="next" href="Pxp_reader.rewrite_system_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.norm_system_id</title> </head> <body> <div class="navbar"><a href="Pxp_reader.lookup_system_id_as_string.html">Previous</a> <a href="Pxp_reader.html">Up</a> <a href="Pxp_reader.rewrite_system_id.html">Next</a> </div> <center><h1>Class <a href="type_Pxp_reader.norm_system_id.html">Pxp_reader.norm_system_id</a></h1></center> <br> <pre><span class="keyword">class</span> <a name="TYPEnorm_system_id"></a>norm_system_id : <code class="type"><a href="Pxp_reader.resolver.html">resolver</a> -> </code><code class="type"><a href="Pxp_reader.resolver.html">resolver</a></code></pre>Normalizes URL's, and forwards the open request to the passed resolver. (Non-URL ID's are forwarded unchanged to the subresolver.) <p> Normalization includes:<ul> <li>Relative URLs are made absolute. If this fails, the problematic relative URL will be rejected.</li> <li><code class="code">..</code> and <code class="code">.</code> and <code class="code">//</code> in the middle of URLs are removed </li> <li>Escaping of reserved characters is normalized (percent encoding like %40)</li> </ul> Normalization is recommended for catalogs, e.g. <pre></pre><code class="code"> <span class="keyword">new</span> norm_system_id<br> (<span class="keyword">new</span> lookup_system_id_as_file<br> [ <span class="string">"http://h/p1"</span>, ...;<br> <span class="string">"http://h/p2"</span>, ...;<br> ])<br> </code><pre></pre> First, the catalog now even works if the URL is written in an unsual way, e.g. <code class="code">http://h/p1/../p2</code>, or <code class="code">http://h/p%31</code>. Second, relative URLs can be used. For instance, the document referred to as <code class="code">http://h/p1</code> can now refer to the other document as <code class="code">p2</code>.<br> <hr width="100%"> </body></html>