TraversalNotes
Traversal Notes
Here are my thoughts on traversal. These will need to be worked out and documented in the appropriate places:
- URL traversal is only one kind of path traversal. There are different traversal contexts with different rules. These rules depend on object types and locations too.
- In general, Browser URLs? should only point to content or views. We should not see methods in browswer URLs?. Maybe this applies to all URLS.
- In URLs? and ZPT TALES paths, it make sense to name views.
For example:
http://xyz.com/foo/bar/info;view/or
tal:attributes="href here/url;view"
Note that the rules for whether you need to use a semi-colon are going to be different. For example, for simple content like contacts or documents, you shouldn't need a semi-colon in a URL, since you'll never traverse to anything but a view in a URL. In a ZPT TALES path, you'll need to be more explicit, because you might refer to methods in ZPT paths.
- Details of traversal will be provided by adapters. For example, the decision of whether to traverse to attributes, or items, or both, or neither, is a policy that will be encapsulated by adapters.
- Where possible, handling of namespaces and other path parameters should be handled centrally to reduce the burden on adapters and views. For example, the handling of explicit namespaces in URLs? is provided the ZopePublication? class and can be taken out of the traversers (although this last hasn't been done yet.)
- efge (Mar 13, 2002 5:25 am; Comment #1)
- The semicolon in TALES is probably going to be somewhat painful, we'll have to double it when it's used in a path.
