forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Where to put components (Re: cvs commit: ...)
Date Thu, 07 Aug 2003 12:56:44 GMT
On Thu, Aug 07, 2003 at 02:24:53PM +0200, Juan Jose Pablos wrote:
> Jeff,
> 
> Jeff Turner wrote:
> >
> >status.xmap does not use any readers, selectors or resources, so why
> >should it declare a dependency on any, or define any?
> >
> 
> That is what I am asking you!, on your last change, you added more
> stuff than what I think is needed.

Oh, sorry, I was looking at an old copy (the one you committed), thinking
"what's wrong with that?" ;)

I'll fix this tomorrow unless you get to it first.

> >status.xmap does use generators, transformers and serializers, so there
> >should probably be 
> >
> ><map:components>
> >  <map:generators default="file"/>
> >  <map:transformers default="xslt"/>
> >  <map:serializer type="html"/>
> ><//map:components>
> >
> >
> 
> But on the last commit you added as well:
> 
> >     <map:readers default="resource"/>
> >     <map:selectors default="browser"/>
> 
> and there are a:
> 
>   <map:resources>
>   </map:resources>
> 
> If there should not be there, let me know and I will removed them.

Yes you're right, they shouldn't be there.  Sorry, seems I rolled back a
bunch of useful changes from your commit.

> >I'm not following.  If I see
> >
> >  <map:transformers default="xslt"/>
> >
> >I know that this subsitemap expects 'xslt' to be defined for it.  Why
> >would I redefine it?  If I wanted to, what's wrong with that?
> >
> 
> There is nothing wrong with define another transformer, but it is wrong 
> if you are going to define the same transformer ( as it happends) 
> because that is duplication.

It's not _defining_ a transformer at all.  It's _declaring_ that this
sitemap expects the default transformer to be 'xslt'.  The 'xslt'
transformer is defined in the root sitemap.

> Belive or not, this code produces confusion, it you want to leave as 
> documentation then let's use <!-- coments -->. I do not like code that 
> does not anything but confuse :-)
> 
> 
> >
> >Yes I see that.  For example, if we defined the HTML generator only in
> >raw.xmap, and then later moved it to sitemap.xmap, we'd break things.
> >However, we could always leave a duplicate definition in raw.xmap.  The
> >other way round (moving from sitemap.xmap to a subsitemap) always breaks
> >things.  It is still better to start with a limited scope, and then
> >expand it if necessary.
> >
> 
> The root problem is the way we overwrite sitemap, and the need for users 
> to overwrite it.

Yes.

No idea how to fix this though..?

Maybe the solution is outside Forrest.  Perhaps we could write a SAX
handler that constructs a 'virtual' sitemap by reading the Forrest
default sitemap, and then adding user-defined parts..

> Can we have an external xml file with all definitions?

Not as far as I know.


--Jeff

> 
> Cheers,
> Cheche
> 

Mime
View raw message