Plasma GitLab Archive
Projects Blog Knowledge

Class Pxp_reader.norm_system_id

class norm_system_id : resolver -> resolver
Normalizes URL's, and forwards the open request to the passed resolver. (Non-URL ID's are forwarded unchanged to the subresolver.)

Normalization includes:

  • Relative URLs are made absolute. If this fails, the problematic relative URL will be rejected.
  • .. and . and // in the middle of URLs are removed
  • Escaping of reserved characters is normalized (percent encoding like %40)
Normalization is recommended for catalogs, e.g.
 new norm_system_id
   (new lookup_system_id_as_file
      [ "http://h/p1", ...;
        "http://h/p2", ...;

 First, the catalog now even works if the URL is written in an
 unsual way, e.g. http://h/p1/../p2, or http://h/p%31. 
 Second, relative URLs can be used. For instance, the document
 referred to as http://h/p1 can now refer to the other document
 as p2.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml