Posted to tcl by colin at Wed Apr 25 07:36:22 GMT 2012view raw

  1. * TUPLES
  2. ** T1: tuples are uniquely indexed by name and by immutable ordinal id number
  3. ** T2: tuples have content of type (which may be a mime type)
  4. ** T3: tuples may have other fields than oid, name, content, type
  5.  
  6. * NAMING of tuples
  7. ** N1: each tuple is uniquely named (from T1)
  8. ** N2: a tuple's name may only comprise characters which are alnums, space, * or +
  9. ** N3: tuple names may be composed by +, such a name is called a 'composite name'
  10. ** N4: name composition is left-associative a+b+c is (a+b)+c
  11.  
  12. * REFERENCES to tuples
  13. ** R1: a reference with the prefix form /#id is a reference to the tuple whose ordinal is id (which might be used as an HTTP object reference)
  14. ** R2: reference /n is a reference to the tuple whose name is n, and known as a 'simple reference'
  15. ** R3: reference /n/c is equivalent to /n+c. Both forms are known as 'compound references'
  16. ** R4: a reference /n.ext is a request to convert the tuple n to the mime type of the extension, and is otherwise equivalent to /n (see P1)
  17. ** R7: a reference /+n is resolved as ${referer}+n
  18.  
  19. * TRANSCLUSION
  20. ** T1: a reference /+n is a transclusion in the context of ${referer}
  21. ** T2: a reference /n or /+n/ is a top level fetch
  22.  
  23. * COMPOSITION - a reference /m+n (or /m/+n) is resolved in the following order:
  24. ** C1: as a tuple named m+n (HTTP Moved?)
  25. ** C2: as a tuple named type(m)+n (HTTP See?)
  26. ** C3: if n has a leading *-character, then (QUESTIONABLE)
  27. *** C3.1 as an element n of the tuple m
  28. *** C3.2: as an operator n applied to m.
  29.  
  30. * TYPE
  31. ** T1: a tuple will be transformed for presentation according to its type, its reference's .ext and client's HTTP Accept and the manner in which it is referenced (either for transclusion or for top-level presentation)
  32. ** T2: the transformation of a tuple n will be performed by the operator n+*type(n). If n+*type(n) is not of type text/tcl or text/js, then n+*type(n)+*type(type(n)) (and so on) will be sought.
  33.  
  34. * OWNERSHIP and permissions
  35. ** OW1: tuples are owned by a user and a group, which have distinct permissions
  36. ** users and groups are themselves tuples named *user+n and *group+n