Hi, Am Freitag, den 18.04.2008, 14:59 +0200 schrieb Bertrand Delacretaz: > On Fri, Apr 18, 2008 at 2:54 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote: > > Am Freitag, den 18.04.2008, 13:59 +0200 schrieb Carsten Ziegeler: > > >...Given that we search in /A and /V, is first /A searched > > > for possible script and only if there is none, /V is searched? Or is the > > > script search alternating between /A and /V? > > > > We must search both locations "at the same" time. I could imagine > > something like: > > > > (1) find best match in /A (aka /apps) > > (2) find better match /V (aka /libs), otherwise use result of (1)... > > XSLT uses a numeric priority scheme to handle such things, we could > probably use something similar: find scripts in both locations, > compute their numeric priorities, use the best match or complain > (probably only a warning) if there's a tie. > > See http://www.w3.org/TR/xslt#conflict for inspiration.
I was in fact thinking of calculating a weight value for each script path and take the one with the greatest value. But I think, it is probably even better to make use of the Comparable interface (or Comparator depending on the actual implementation) and be able to just compare two objects representing the scripts and using the "higher" one. Regards Felix
