forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: forrest:hook vs. direct markup - should we drop the hook concept?
Date Fri, 02 Dec 2005 15:22:58 GMT
El vie, 02-12-2005 a las 08:20 -0500, Tim Williams escribió:
> On 12/2/05, Thorsten Scherler <> wrote:
> > Hi all,
> I've unfortunately been too busy to properly keep up with all of your
> progress so this may not be worth much.

No worries, mate. As soon as you have more time I am sure you will get
into the whole stuff again. ;-) Thanks very much for your thoughts they
are always great. 

> > lately we proposed a new attribute @element for the forrest:hook
> > element. Now it is possible to have any markup as hook.
> I didn't catch this but now that I understand it, it makes me think
> that we might be letting our templating language make too many
> assumptions about the output (e.g. that it is markup).  Same thing for
> the new hooksXPath attribute. How are these supportive of non-markup
> output formats like text/rtf?

Actually Ross already gave an answer to this, but let me give one to the
last part of the paragraph. 

Non markup formats can define e.g.
<forrest:view type="rtf">
 <forrest:contract name="someThing">

The output would be just be placed in an empty document. No structure
needed, so no hooks used and additional markup (besides the one the
contract may produce).

> > That made me think:
> > - why do we want to have forrest:hooks instead of direct markup?
> To keep it independent of a specific output format - an generic
> container that only has a "div" meaning when the view @type="html"?

Hmm, actually with generic markup you can still have the definition of
more then 1 format. e.g.
<forrest:view type="html">
 <div class="test" id="1">
  <forrest:contract name="someThing">
<forrest:view type="rtf">
 <forrest:contract name="someThing">
<forrest:view type="fo">
  <forrest:contract name="someThing">

> > - what are the advantages of forrest:hooks?
> I don't know -- it's been a while since I've looked into the details
> of this stuff but I think they are needed to group contracts together
> since contracts can't contain other contracts.

hmm, generic markup could do the same, or?

> > - would it not be sufficient to have forrest:view and forrest:contract?
> If you had two contracts that needed the same output style how could
> you do it without having a hook to contain them?

<forrest:view type="html">
 <div class="test" id="1">
  <forrest:contract name="someThing">
  <forrest:contract name="someThingElse">

> > I will later post my views before I hear some opinions.
> I reckon I think the hooks are needed, but that's based on a dated
> understanding of this stuff.  Since you are asking the question, I
> gather that you might believe that it could be done without hooks and
> I trust that.  

Yeah, I am pretty sure that it can be done. I played around and I
thought about something like:

  <forrest:view type="html">
   <forrest:contract name="someNote">

Which means any given document can request format specific extra
content. We only have to enable the transformation in the corresponding

> I am interested in hearing your thoughts on how tightly
> bound our templating language (*fv) to a markup output though.  

Actually the dispatcher should not be tight to a markup format, it
should support any given format.

> I
> haven't looked at your newer java stuff yet to see if those new
> attributes are required or not.  

No hooks are right now just passed through no transformation yet

> Sorry for not being able to keep up
> with you on this stuff so that you can get some more valuable feedback
> -- you're simply moving too fast for me right now;)

Your feedback was and is most valuable. Thx for taking the time.

> --tim


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

View raw message