You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Tim Williams <wi...@gmail.com> on 2005/07/08 21:56:45 UTC

Locationmap fallback [was: svn commit: r209820 - in /forrest/trunk/main/webapp: WEB-INF/xconf/forrest-core.xconf locationmap.xml sitemap.xmap

I'd prefer project-level locationmaps to be overrides or extensions
rather than replacements for the app-level locationmap.  In other
words, with this implementation, the project-level lm assumes all
location resolving when it exists even if it only needed to add one
unique location resolution.  Unfortunately, locationmaps don't have
the same concept of "mounting" so that we could simply mount
project-level lm's ahead of the app-level one.  In other words, I'd
like them to work exactly as the project- and forrest-level sitemaps
work. Thoughts?
--tim

On 7/8/05, rgardler@apache.org <rg...@apache.org> wrote:
> Author: rgardler
> Date: Fri Jul  8 08:40:45 2005
> New Revision: 209820
> 
> URL: http://svn.apache.org/viewcvs?rev=209820&view=rev
> Log:
> make backward comppatible by providing a fallback locationmap. This will, be used to define the default forrest locations for a file.
> 
> Added:
>     forrest/trunk/main/webapp/locationmap.xml   (with props)
> Modified:
>     forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf
>     forrest/trunk/main/webapp/sitemap.xmap
> 
> Modified: forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf?rev=209820&r1=209819&r2=209820&view=diff
> ==============================================================================
> --- forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf (original)
> +++ forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf Fri Jul  8 08:40:45 2005
> @@ -129,6 +129,7 @@
>          <plugins-src>@forrest.home@/plugins</plugins-src>
>          <whiteboard-plugins-src>@forrest.home@/whiteboard/plugins</whiteboard-plugins-src>
>          <plugins>@forrest.home@/build/plugins</plugins>
> +        <locationmap>@context.home@/locationmap.xml</locationmap>
>        </values>
>      </component-instance>
> 
> 
> Added: forrest/trunk/main/webapp/locationmap.xml
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap.xml?rev=209820&view=auto
> ==============================================================================
> --- forrest/trunk/main/webapp/locationmap.xml (added)
> +++ forrest/trunk/main/webapp/locationmap.xml Fri Jul  8 08:40:45 2005
> @@ -0,0 +1,33 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> +  Copyright 2002-2005 The Apache Software Foundation or its licensors,
> +  as applicable.
> +
> +  Licensed under the Apache License, Version 2.0 (the "License");
> +  you may not use this file except in compliance with the License.
> +  You may obtain a copy of the License at
> +
> +      http://www.apache.org/licenses/LICENSE-2.0
> +
> +  Unless required by applicable law or agreed to in writing, software
> +  distributed under the License is distributed on an "AS IS" BASIS,
> +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +  See the License for the specific language governing permissions and
> +  limitations under the License.
> +-->
> +
> +<!-- Default Forrest locationmap -->
> +
> +<locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
> +
> +  <components>
> +    <matchers default="lm">
> +      <matcher
> +        name="lm"
> +        src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
> +    </matchers>
> +  </components>
> +
> +  <locator>
> +  </locator>
> +</locationmap>
> 
> Propchange: forrest/trunk/main/webapp/locationmap.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
> 
> Modified: forrest/trunk/main/webapp/sitemap.xmap
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?rev=209820&r1=209819&r2=209820&view=diff
> ==============================================================================
> --- forrest/trunk/main/webapp/sitemap.xmap (original)
> +++ forrest/trunk/main/webapp/sitemap.xmap Fri Jul  8 08:40:45 2005
> @@ -358,7 +358,14 @@
>          </map:match>
> 
>          <map:match pattern="locationmap.xml">
> -          <map:generate src="{project:content}/locationmap.xml" />
> +          <map:select type="exists">
> +            <map:when test="{project:content}/locationmap.xml">
> +              <map:generate src="{project:content}/locationmap.xml" />
> +            </map:when>
> +            <map:otherwise>
> +              <map:generate src="{forrest:locationmap}" />
> +            </map:otherwise>
> +          </map:select>
>            <map:serialize type="xml"/>
>          </map:match>
> 
> 
> 
>

Re: Mounting Locationmaps [was: Locationmap fallback}

Posted by Tim Williams <wi...@gmail.com>.
On 8/23/05, Ross Gardler <rg...@apache.org> wrote:
> Tim Williams wrote:
> >>I hope to sit down with someone more familiar with Cocoon at the
> >>Hackathon and work out how to enact Unico's recomendations on the Cocoon
> >>dev list.
> >
> >
> > Did you get a chance to sit down with any Cocooners on this at
> > ApacheCon?  I think I've got a better handle on Unico's
> > recommendations at this point myself.  I think we can probably get
> > this done.  Let me know what you figured out...
> 
> No I'm afraid I didn't (I doubt anyone else did either). Even worse, I
> have a new requirement for the locationmap. We need to be able to get at
> the request object in the matchers (specifically the lang header for i18n).
> 
> I'll be back online properly in a few days and will be ready to bounce
> ideas around then.

I'll be out of town with sporadic online access for the next two
weeks, if no one has had a chance, I can look at the mounting then.  
I didn't even think about the i18n needing certain information in
order to do all location resolution down there -- I'll be interested
in hearing about that and the Views/Templates/whatever discussion when
I get back...
--tim

Re: Mounting Locationmaps [was: Locationmap fallback}

Posted by Unico Hommes <un...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ross Gardler wrote:
> Tim Williams wrote:
> 
>>> I hope to sit down with someone more familiar with Cocoon at the
>>> Hackathon and work out how to enact Unico's recomendations on the Cocoon
>>> dev list.
>>
>>
>>
>> Did you get a chance to sit down with any Cocooners on this at
>> ApacheCon?  I think I've got a better handle on Unico's
>> recommendations at this point myself.  I think we can probably get
>> this done.  Let me know what you figured out...
> 
> 
> No I'm afraid I didn't (I doubt anyone else did either). Even worse, I
> have a new requirement for the locationmap. We need to be able to get at
> the request object in the matchers (specifically the lang header for i18n).

Cocoon's object model is passed to all Matchers and Selectors exactly as
in the sitemap. That is why one can use almost any Matcher/Selector that
can be used in the sitemap including the HeaderMatcher/Selector.

- --
Unico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC5ObDcuec8tVNKAwRAtlFAJ9pyifvoHpIJD8H1AmRLtqihvqUoACg0h22
sEIxpFAUr5uR1IS2eGfK0PY=
=ec4A
-----END PGP SIGNATURE-----


Re: Mounting Locationmaps [was: Locationmap fallback}

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
>>I hope to sit down with someone more familiar with Cocoon at the
>>Hackathon and work out how to enact Unico's recomendations on the Cocoon
>>dev list.
> 
> 
> Did you get a chance to sit down with any Cocooners on this at
> ApacheCon?  I think I've got a better handle on Unico's
> recommendations at this point myself.  I think we can probably get
> this done.  Let me know what you figured out...

No I'm afraid I didn't (I doubt anyone else did either). Even worse, I 
have a new requirement for the locationmap. We need to be able to get at 
the request object in the matchers (specifically the lang header for i18n).

I'll be back online properly in a few days and will be ready to bounce 
ideas around then.

Ross

Mounting Locationmaps [was: Locationmap fallback}

Posted by Tim Williams <wi...@gmail.com>.
> >>[Slightly OT] I wonder if we should really consider donating this back
> >>to Cocoon. I think this code is of use to a much wider audience than
> >>Forrest and there may be more devs to maintain it there. We have people
> >>here who are committers on Cocoon right?
> >
> >
> > I would like to see this in Cocoon also. Currently I build my own
> > version of the locationmap jar from the forrest sources using a local
> > script but that's not very convenient.
> 
> Consensus here seems to be to work on it here, at least for the
> forseeable future. We should create a target as Nicola suggests to make
> integration with Cocoon easier.
> 
> I hope to sit down with someone more familiar with Cocoon at the
> Hackathon and work out how to enact Unico's recomendations on the Cocoon
> dev list.

Did you get a chance to sit down with any Cocooners on this at
ApacheCon?  I think I've got a better handle on Unico's
recommendations at this point myself.  I think we can probably get
this done.  Let me know what you figured out...
--tim

Re: Locationmap fallback [was: svn commit: r209820]

Posted by Ross Gardler <rg...@apache.org>.
Unico Hommes wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ross Gardler wrote:
> 
>>Ross Gardler wrote:
>>
>>
>>>David Crossley wrote:
>>
>>
>>...
>>
>>
>>>>I wonder if a quick chat on Cocoon dev might be better. We need
>>>>to report our general success anyway. You never know, Unico might
>>>>get excited and come over to help us :-)
>>>
>>>
>>>
>>>Again, I agree. I'll post to Cocoon dev today.
>>
>>
>>If anyone wants to follow along:
>>
>>http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=112107449831525&w=2
>>
>>[Slightly OT] I wonder if we should really consider donating this back
>>to Cocoon. I think this code is of use to a much wider audience than
>>Forrest and there may be more devs to maintain it there. We have people
>>here who are committers on Cocoon right?
> 
> 
> I would like to see this in Cocoon also. Currently I build my own
> version of the locationmap jar from the forrest sources using a local
> script but that's not very convenient.

Consensus here seems to be to work on it here, at least for the 
forseeable future. We should create a target as Nicola suggests to make 
integration with Cocoon easier.

I hope to sit down with someone more familiar with Cocoon at the 
Hackathon and work out how to enact Unico's recomendations on the Cocoon 
dev list.

Ross

Re: Locationmap fallback [was: svn commit: r209820]

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Thorsten Scherler wrote:
> On Mon, 2005-07-11 at 16:16 +0200, Unico Hommes wrote:
> 
>>Nicola Ken Barozzi wrote:
>>
>>>Unico Hommes wrote:
...
>>>To make it easier for you to use it indipendently from Forrest, we could
>>>add a separate ant target for building it and when we release Forrest,
>>>keep it as a separate jar.
>>
>>Okay, that would be nice.
> 
> That is a good start but IMO it should become a block.

Blocks do not exist (yet), they are just separate jars. I know it
because I started it myself 8-)

So in fact, making the locationmap a separate jar, basically makes it a
"block".

In any case, when real blocks will arrive, the need to move the code to
Cocoon will be even less compelling, as anyone will use the block
regardless where it stands.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Locationmap fallback [was: svn commit: r209820]

Posted by Thorsten Scherler <th...@apache.org>.
On Mon, 2005-07-11 at 16:16 +0200, Unico Hommes wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Nicola Ken Barozzi wrote:
> > Unico Hommes wrote:
> > 
> >>Ross Gardler wrote:
> > 
> > ...
> > 
> >>>[Slightly OT] I wonder if we should really consider donating this back
> >>>to Cocoon. I think this code is of use to a much wider audience than
> >>>Forrest and there may be more devs to maintain it there. We have people
> >>>here who are committers on Cocoon right?
> >>
> >>I would like to see this in Cocoon also. Currently I build my own
> >>version of the locationmap jar from the forrest sources using a local
> >>script but that's not very convenient.
> >>
> >>OTOH, if you decide to implement the mounting stuff, it would be much
> >>more convenient for you to leave it inside Forrest. (Assuming you don't
> >>have committer privs on Cocoon yourself?)
> >>
> >>Anyway, if you do decide to put this in cocoon then I could take care of it.
> > 
> > 
> > I appreciate your offer, but for the time being, I prefere that we keep
> > it here. We are the ones using it more, so it's better for it not to move.
> 
> I knew you were gonna say that :-) It is a little bit of a chicken/egg
> problem. People won't start using it unless they are aware that it's out
> there. Having it as an integral part inside Forrest does not help
> attract maximum amount of people to start using it. If it was a cocoon
> block with samples that would do a lot more for exposure.
> 

I agree with you Unico. I suggest we will add the features that we need
for forrest here in this code base and then refactor what we have as
block.

If we then further need to extend or change the stuff we need to patch
it, or somebody that is committer over cocoon has to apply the patches.

I think we kept it to long "hidden" in our rep. ;-)


> > To make it easier for you to use it indipendently from Forrest, we could
> > add a separate ant target for building it and when we release Forrest,
> > keep it as a separate jar.
> 
> Okay, that would be nice.
> 

That is a good start but IMO it should become a block.

salu2

> - --
> Unico
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
> 
> iD8DBQFC0n9Icuec8tVNKAwRAj7IAKDWgCC1lB61NtlGmRqVghtv7pBr0ACfY1PV
> bS/G0L0y6vqZQiVsCJfoKVk=
> =GH7A
> -----END PGP SIGNATURE-----
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: Locationmap fallback [was: svn commit: r209820]

Posted by Reinhard Poetz <re...@apache.org>.
Unico Hommes wrote:
> Nicola Ken Barozzi wrote:
>>Unico Hommes wrote:

>>>Anyway, if you do decide to put this in cocoon then I could take care of it.
>>
>>
>>I appreciate your offer, but for the time being, I prefere that we keep
>>it here. We are the ones using it more, so it's better for it not to move.
> 
> 
> I knew you were gonna say that :-) It is a little bit of a chicken/egg
> problem. People won't start using it unless they are aware that it's out
> there. Having it as an integral part inside Forrest does not help
> attract maximum amount of people to start using it. If it was a cocoon
> block with samples that would do a lot more for exposure.


I suggest that you develop it within the Forrest project and when the 
locationmap has all the features you need, you can give it back as it's indeed 
interesting for usecases outside of Forrest.


-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: Locationmap fallback [was: svn commit: r209820]

Posted by Unico Hommes <un...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nicola Ken Barozzi wrote:
> Unico Hommes wrote:
> 
>>Ross Gardler wrote:
> 
> ...
> 
>>>[Slightly OT] I wonder if we should really consider donating this back
>>>to Cocoon. I think this code is of use to a much wider audience than
>>>Forrest and there may be more devs to maintain it there. We have people
>>>here who are committers on Cocoon right?
>>
>>I would like to see this in Cocoon also. Currently I build my own
>>version of the locationmap jar from the forrest sources using a local
>>script but that's not very convenient.
>>
>>OTOH, if you decide to implement the mounting stuff, it would be much
>>more convenient for you to leave it inside Forrest. (Assuming you don't
>>have committer privs on Cocoon yourself?)
>>
>>Anyway, if you do decide to put this in cocoon then I could take care of it.
> 
> 
> I appreciate your offer, but for the time being, I prefere that we keep
> it here. We are the ones using it more, so it's better for it not to move.

I knew you were gonna say that :-) It is a little bit of a chicken/egg
problem. People won't start using it unless they are aware that it's out
there. Having it as an integral part inside Forrest does not help
attract maximum amount of people to start using it. If it was a cocoon
block with samples that would do a lot more for exposure.

> To make it easier for you to use it indipendently from Forrest, we could
> add a separate ant target for building it and when we release Forrest,
> keep it as a separate jar.

Okay, that would be nice.

- --
Unico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC0n9Icuec8tVNKAwRAj7IAKDWgCC1lB61NtlGmRqVghtv7pBr0ACfY1PV
bS/G0L0y6vqZQiVsCJfoKVk=
=GH7A
-----END PGP SIGNATURE-----


Re: Locationmap fallback [was: svn commit: r209820]

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Unico Hommes wrote:
> Ross Gardler wrote:
...
>>[Slightly OT] I wonder if we should really consider donating this back
>>to Cocoon. I think this code is of use to a much wider audience than
>>Forrest and there may be more devs to maintain it there. We have people
>>here who are committers on Cocoon right?
> 
> I would like to see this in Cocoon also. Currently I build my own
> version of the locationmap jar from the forrest sources using a local
> script but that's not very convenient.
> 
> OTOH, if you decide to implement the mounting stuff, it would be much
> more convenient for you to leave it inside Forrest. (Assuming you don't
> have committer privs on Cocoon yourself?)
> 
> Anyway, if you do decide to put this in cocoon then I could take care of it.

I appreciate your offer, but for the time being, I prefere that we keep
it here. We are the ones using it more, so it's better for it not to move.

To make it easier for you to use it indipendently from Forrest, we could
add a separate ant target for building it and when we release Forrest,
keep it as a separate jar.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Locationmap fallback [was: svn commit: r209820]

Posted by Unico Hommes <un...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ross Gardler wrote:
> Ross Gardler wrote:
> 
>> David Crossley wrote:
> 
> 
> ...
> 
>>> I wonder if a quick chat on Cocoon dev might be better. We need
>>> to report our general success anyway. You never know, Unico might
>>> get excited and come over to help us :-)
>>
>>
>>
>> Again, I agree. I'll post to Cocoon dev today.
> 
> 
> If anyone wants to follow along:
> 
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=112107449831525&w=2
> 
> [Slightly OT] I wonder if we should really consider donating this back
> to Cocoon. I think this code is of use to a much wider audience than
> Forrest and there may be more devs to maintain it there. We have people
> here who are committers on Cocoon right?

I would like to see this in Cocoon also. Currently I build my own
version of the locationmap jar from the forrest sources using a local
script but that's not very convenient.

OTOH, if you decide to implement the mounting stuff, it would be much
more convenient for you to leave it inside Forrest. (Assuming you don't
have committer privs on Cocoon yourself?)

Anyway, if you do decide to put this in cocoon then I could take care of it.

- --
Unico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC0mZ5cuec8tVNKAwRAmTGAJwLcpruwRNAZE0cTFzMzAoFADE9CwCfc/+t
pgx7YM2rVqWigmExV2dKbrI=
=Xaew
-----END PGP SIGNATURE-----


Re: Locationmap fallback [was: svn commit: r209820]

Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> David Crossley wrote:

...

>> I wonder if a quick chat on Cocoon dev might be better. We need
>> to report our general success anyway. You never know, Unico might
>> get excited and come over to help us :-)
> 
> 
> Again, I agree. I'll post to Cocoon dev today.

If anyone wants to follow along:

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=112107449831525&w=2

[Slightly OT] I wonder if we should really consider donating this back 
to Cocoon. I think this code is of use to a much wider audience than 
Forrest and there may be more devs to maintain it there. We have people 
here who are committers on Cocoon right?

Ross

Re: Locationmap fallback [was: svn commit: r209820]

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> 
>>At a later date we may decide to put this behaviour in the java code. 
>>But for a "get it working" solution I think this will work.
>>
>>Comments?
> 
> 
> I worry about that approach because it is too easy to let
> the workaround take hold.

Yes, you are right. I should also open an issue to prevent this slipping 
through into a release (will do in a moment)

> I wonder if a quick chat on Cocoon dev might be better. We need
> to report our general success anyway. You never know, Unico might
> get excited and come over to help us :-)

Again, I agree. I'll post to Cocoon dev today. I won't have time to 
follow up on actual code this week, but I may be able to get someone to 
help out at the hackathon. It's time I learnt the innards of Cocoon.

Ross

Re: Locationmap fallback [was: svn commit: r209820]

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> 
> At a later date we may decide to put this behaviour in the java code. 
> But for a "get it working" solution I think this will work.
> 
> Comments?

I worry about that approach because it is too easy to let
the workaround take hold.

I wonder if a quick chat on Cocoon dev might be better. We need
to report our general success anyway. You never know, Unico might
get excited and come over to help us :-)

For the benefit of recent Forrest developers. This was the
first implementation of the Locationmap ability and it has
been dormant in our core until we were ready to use it.
Of course, Cocoon has moved on in that time.
e.g. pass-through sitemaps has enabled us to have the
project sitemaps.

-David


Re: Locationmap fallback [was: svn commit: r209820 - in /forrest/trunk/main/webapp: WEB-INF/xconf/forrest-core.xconf locationmap.xml sitemap.xmap

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> On 7/8/05, Ross Gardler <rg...@apache.org> wrote:
> 
>>Tim Williams wrote:
>>
>>>I'd prefer project-level locationmaps to be overrides or extensions
>>>rather than replacements for the app-level locationmap.
>>
>>That's the intention, though not well described in the commit message.
>>
>>The implementation I put in place is to get things working quickly since
>>we broke head. I intend to modify the LocationMapModule class to mount
>>an empty locationmap if it cannot find the project one (i.e. do what the
>>current workaround does). In the meantime we can start building the
>>forrest locationmap.
>>
>>
>>> Unfortunately, locationmaps don't have
>>>the same concept of "mounting" so that we could simply mount
>>>project-level lm's ahead of the app-level one.
>>
>>Yes they do - at least in theory, I've not tested it yet. If I
>>understand it right pretty much any of the map: elements can be used (or
>>easily be made to work).
> 
> 
> It looks to me like it's an implementation that mimics the sitemap
> syntax but doesn't necessarily make use of it's full power (e.g.
> TreeProcessor,etc.).  

I've looked into the source in more detail, and you are right.

I therefore propose we build the locationmap using XSL. I want plugins 
to be able to provide their own locationmaps as well as projects, but we 
should start with the simple case of project sitemaps. So we would have 
something like:

<map:match pattern="locationmap.xml">
   <map:aggregate element="locationmaps">
     <map:part src="{forrest:locationmap}"/>
     <map:part src="{project:content}/locationmap.xml"/>
   </map:aggregate>
   <map:transform 
src="{forrest:stylesheets}/locationmapAggregate2locationmap.xsl"/>
   <map:serialise type="xml"/>
</map:pattern>

NOTE: we would have to have a test to ensure that the project 
locationmap existing.

In the XSL we would merge all the components and give priority to 
locators as follows:

project -> plugins -> forrest

At a later date we may decide to put this behaviour in the java code. 
But for a "get it working" solution I think this will work.

Comments?

Ross

Re: Locationmap fallback [was: svn commit: r209820 - in /forrest/trunk/main/webapp: WEB-INF/xconf/forrest-core.xconf locationmap.xml sitemap.xmap

Posted by Tim Williams <wi...@gmail.com>.
On 7/8/05, Ross Gardler <rg...@apache.org> wrote:
> Tim Williams wrote:
> > I'd prefer project-level locationmaps to be overrides or extensions
> > rather than replacements for the app-level locationmap.
> 
> That's the intention, though not well described in the commit message.
> 
> The implementation I put in place is to get things working quickly since
> we broke head. I intend to modify the LocationMapModule class to mount
> an empty locationmap if it cannot find the project one (i.e. do what the
> current workaround does). In the meantime we can start building the
> forrest locationmap.
> 
> >  Unfortunately, locationmaps don't have
> > the same concept of "mounting" so that we could simply mount
> > project-level lm's ahead of the app-level one.
> 
> Yes they do - at least in theory, I've not tested it yet. If I
> understand it right pretty much any of the map: elements can be used (or
> easily be made to work).

It looks to me like it's an implementation that mimics the sitemap
syntax but doesn't necessarily make use of it's full power (e.g.
TreeProcessor,etc.).  Clearly this is at the gray area of my
understanding but it looks like the LocationMap implementation
implements its own replica of "sitemap" language and not all
functionality  (e.g. MountNode) is available.  I'd really like my
reading of the lm stuff to be wrong though.

> In other words. I agree with everything you say. I hope others do too ;-)

good to hear our goals are the same even if I don't understand the
current reality as well as you...
--tim

Re: Locationmap fallback [was: svn commit: r209820 - in /forrest/trunk/main/webapp: WEB-INF/xconf/forrest-core.xconf locationmap.xml sitemap.xmap

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> I'd prefer project-level locationmaps to be overrides or extensions
> rather than replacements for the app-level locationmap.  

That's the intention, though not well described in the commit message.

The implementation I put in place is to get things working quickly since 
we broke head. I intend to modify the LocationMapModule class to mount 
an empty locationmap if it cannot find the project one (i.e. do what the 
current workaround does). In the meantime we can start building the 
forrest locationmap.

>  Unfortunately, locationmaps don't have
> the same concept of "mounting" so that we could simply mount
> project-level lm's ahead of the app-level one.  

Yes they do - at least in theory, I've not tested it yet. If I 
understand it right pretty much any of the map: elements can be used (or 
easily be made to work).

In other words. I agree with everything you say. I hope others do too ;-)

Ross