home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / webster / !Webster / Docs / urltrans < prev    next >
Text File  |  1995-06-25  |  4KB  |  79 lines

  1. <HTML></HEAD><BODY><title>URL Translation</title>
  2. <HEAD><BODY>
  3. <center>
  4. <A HREF="starting.html"><IMG WIDTH=67 HEIGHT=39 ALT="Prev" SRC="ToPrev"></A> <a HREF="../!Help.html#index"><IMG WIDTH=67 HEIGHT=39 ALT="Index" SRC="ToIndex"></a> <IMG WIDTH=67 HEIGHT=39 ALT="Prev" SRC="Blank"><BR>
  5. <h1>URL Translation</h1>
  6. </center>
  7.  
  8. URLs for links are translated in several ways
  9. <H2>Truncation</h2>
  10. Where the name or extension is followed by a comma and a number it means that that part is truncated to the given number of characters.
  11. <PRE>
  12. <ol>
  13. <LI>(<var>name,8</var> + '/' + <var>extension</var>),10
  14. <LI>(<var>name</var> + '/' + <var>extension</var>),10
  15. <LI>(<var>name</var> + '_' + <var>extension</var>),10
  16. <LI>(<var>name,8</var> + '_' + <var>extension</var>),10
  17. <LI>(<var>name,8</var> + '/' + <var>extension,3</var>),10
  18. <LI>(<var>name</var> + '/' + <var>extension</var>),10
  19. <LI>(<var>name</var> + '_' + <var>extension</var>),10
  20. <LI>(<var>name,8</var> + '_' + <var>extension,3</var>),10
  21. <LI><var>name</var> + '/' + <var>extension,3</var>
  22. <LI><var>name</var> + '_' + <var>extension,3</var>
  23. <LI><var>name</var> + '/' + <var>extension</var>
  24. <LI><var>name</var> + '_' + <var>extension</var>
  25. <LI><var>extension</var> + '.' + <var>name</var>        (The dot being directory Separator)
  26. <LI><var>extension</var> + '.' + <var>name,10</var>        (The dot being directory Separator)
  27. <LI><var>name</var> + '.' + <var>extension</var>        (The dot being directory Separator)
  28. <LI><var>name,10</var> + '.' + <var>extension</var>        (The dot being directory Separator)
  29. <LI><var>name</var>
  30. </ol>
  31. </PRE>
  32. Of course with real filenames some of these translations will produce the same results.
  33.  
  34. <h2>Truncation in more detail</h2>
  35. (Using method 1)
  36. <ul>
  37. <li>Split the filename at the last dot (<CODE>.</CODE>).
  38. <li>Truncate the bit before the dot to the first 8 characters.
  39. <li>Append a slash (<CODE>/</CODE>) and the bit after the original dot.
  40. <li>Take the 10 leftmost characters.
  41. </ul>
  42.  
  43. <strong>Example</strong>
  44. <P>
  45. (Using method 1)
  46. <ul>
  47. <li>The URL <var>very_long_file.html</var>
  48. <li>Becomes <var>very_long_file</var> and <var>html</var>
  49. <li>Truncating <var>very_long_file</var> gives <var>very_lon</var>
  50. <li>Appending <CODE>/</CODE> and the bit after dot gives <var>very_lon/html</var>
  51. <li>Taking the 10 leftmost characters gives a final value of <var>very_lon/h</var>
  52. </ul>
  53.  
  54. <h2>Directory limits</h2>
  55.  
  56. RISC OS suffers from has a slight problem when transfering files from other machines (Especially unix boxes as many http servers are) and that is the limit of 77 files per directory.
  57. <P>
  58. To get round this problems in Webster looks in the driectory specified first. If the file is not their it looks in directories of the same name with the addition of a number between 2 and 4.
  59. <P>e.g. The file <quote>$.file.books.AtoZ</quote> will be searched for in the following places.
  60. <ol>
  61. <LI>$.file.books.AtoZ
  62. <LI>$.file.books2.AtoZ
  63. <LI>$.file.books3.AtoZ
  64. <LI>$.file.books4.AtoZ
  65. </ol>
  66. This allows 308 files to be in the same directory as far as Webster is concerned.
  67. <P>
  68. <dl>
  69. <dt>NOTE <dd>This translation is only ever applied to the last directory in any filename. This means any directories in the <quote>books2</quote> directory would never be searched.
  70. </dl>
  71. <h2>Absolute and Relative links</h2>
  72. Absolute links are taken to start from the root direcory of the Disc or Archive that the current file is held on (assuming the position of the Archive is indicated by a <quote>$</quote> in the filename)
  73.  
  74. <p>
  75. Relative links are translated correctly, with the exception of URLs starting with tilde (<code>~</code>) which strictly speaking should use a specified directory in a users home directory. The username being immediately after the tilde (<code>~</code>).
  76. As RISC OS has no concept of users, all URLs starting in a tilde (<code>~</code>) are taken to have a / at the front making them absolute, i.e. they then point to a directory or file starting with a tilde.
  77. <hr><address><A HREF="author.html">Andrew Pullan</A>, 11th February 1995</address>
  78. </BODY></HTML>
  79.