forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Locationmap now works for repositories
Date Tue, 07 Jun 2005 10:43:36 GMT
Tim Williams wrote:
> On 6/6/05, Ross Gardler <rgardler@apache.org> wrote:
> 
>>Tim Williams wrote:
>>
>>>On 6/6/05, Ross Gardler <rgardler@apache.org> wrote:
>>>
>>>
>>>>Tim Williams wrote:
>>
>>...
>>
>>
>>><map:select type="exists">
>>>     <map:when test="{project:content.xdocs}tabs.xml">
>>>          <map:generate src="{project:content.xdocs}tabs.xml"/>
>>>     </map:when>
>>>     <map:when test="{lm:tabs.xml}">
>>>          <map:generate src="{lm:tabs.xml}"/>
>>>      </map:when>
>>></map:select>
>>
>>This is interesting. Have you tested what happens when {lm:tabs.xml}
>>does not point to anything useful? That is, does the second <map:when> work?
> 
> 
> :( Sadly, no.  It looks like {lm:tabs.xml} always evaluates to
> existing.  Are locationmaps not usable in an exists selector for some
> reason?
>

My guess is (there's another disclaimer, I haven't tested this yet)...

Since you are mapping the {lm:tabs.xml} to a http request a document is 
always returned. It may be a 404 error, but it is still a document. To 
confirm this we would need to look at the generator code and, if 
necessary detect error conditions from the various repository types.

Ross

Mime
View raw message