URL Translation
Prev Index Prev

URL Translation

URLs for links are translated in several ways

Truncation

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.
  1. (name,8 + '/' + extension),10
  2. (name + '/' + extension),10
  3. (name + '_' + extension),10
  4. (name,8 + '_' + extension),10
  5. (name,8 + '/' + extension,3),10
  6. (name + '/' + extension),10
  7. (name + '_' + extension),10
  8. (name,8 + '_' + extension,3),10
  9. name + '/' + extension,3
  10. name + '_' + extension,3
  11. name + '/' + extension
  12. name + '_' + extension
  13. extension + '.' + name (The dot being directory Separator)
  14. extension + '.' + name,10 (The dot being directory Separator)
  15. name + '.' + extension (The dot being directory Separator)
  16. name,10 + '.' + extension (The dot being directory Separator)
  17. name
Of course with real filenames some of these translations will produce the same results.

Truncation in more detail

(Using method 1) Example

(Using method 1)

Directory limits

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.

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.

e.g. The file $.file.books.AtoZ will be searched for in the following places.

  1. $.file.books.AtoZ
  2. $.file.books2.AtoZ
  3. $.file.books3.AtoZ
  4. $.file.books4.AtoZ
This allows 308 files to be in the same directory as far as Webster is concerned.

NOTE
This translation is only ever applied to the last directory in any filename. This means any directories in the books2 directory would never be searched.

Absolute and Relative links

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 $ in the filename)

Relative links are translated correctly, with the exception of URLs starting with tilde (~) which strictly speaking should use a specified directory in a users home directory. The username being immediately after the tilde (~). As RISC OS has no concept of users, all URLs starting in a tilde (~) 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.


Andrew Pullan, 11th February 1995