Ross Gardler wrote: > Diwaker Gupta wrote: > >Ross Gardler wrote: > > > >>Cool. Does this mean the issue you raised earlier in this thread about > >>the LM verifying the existence of a file is not critical? > >> > >>I think you had a valid point about this when using the LM to rewrite > >>links, but I'm not sure if this was all one of the strange effects you > >>were getting. > > > >This issue still exists (try changing burrokeet.org to foobar.com or some > >random name in samples/locationmap/index.xml and see what happens). I > >certainly think its critical (and I think an implementation that does > >_not_ do this check would be simpler). What do other people think about it?
I became aware of that recently. We actually had a bad URL for that demo, but we didn't know it was broken. Suddenly there was a change in behaviour. It didn't used to verify. See where i needed to change the demo. svn log main/fresh-site/src/documentation/content/locationmap.xml ------ Restore upgrade from excalibur-sourceresolve-1.1 to excalibur-sourceresolve-2.1 Use a successful result for the rewriteDemo/index locationmap demo in seed-sample. See "changed behaviour for locationmap" http://marc.theaimsgroup.com/?l=forrest-dev&m=11270994920771 ------ > There are two distinct uses of the locationmap. One is for URL rewriting > (like you are doing). In this instance I think you have a good case for > not doing the check for existence, at least during development. However, > at publication time I think this is a valid check as it will highlight > broken links. > > The other use of the LM is where we use it to resolve the location of a > source file, as in the sitemap stuff. I this instance the check has to > be made, otherwise a meaningless error is given (null pointer). > > One solution would be to add an attribute to the locator node that > allows us to set whether we should check for existence. This could have > three values: "always", "never" or "publication". The last option would > allow us (with the addition of a new CLI parameter) to check that the > file exists when we try and publish the site, but would allow us to > ignore errors during development. However we do not want to ignore errors during development, so the default is good. -David > I don't have the time to implement this yet. If this proposal would > solve your problem then please add it to the issue tracker (along with > any other alternatives you can think of). > > Ross
