You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jim Moran <ji...@corp.earthlink.net> on 2001/05/10 21:40:05 UTC

Selector architecure

I noticed that the Selector Interface's select method returns a boolean.  Thus for a selector like the BrowserSelector the sitemap has to test each possible case until it finds one that returns true.  Wouldn't it be more efficient to just have the Selector Interface return a String which would be used to lookup a branch in a Map?  Then the sitemap.xmap syntax for a selector would look and execute more like a switch/case than a nested if.  This would avoid having to test every possible case to find the right branch to take.

Jim Moran