forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: hooks injection (was Re: DispatcherTransformer.java )
Date Tue, 22 Nov 2005 16:43:13 GMT
> Ross Gardler a écrit :
> 
>> Thorsten Scherler wrote:
>>
>>> El mar, 22-11-2005 a las 12:51 +0000, Ross Gardler escribió:
>>>
>>>> Thorsten Scherler wrote:
>>>>
>>>>> El lun, 21-11-2005 a las 12:04 +0000, Ross Gardler escribió: ...

...

>>>>>>> I propose to make the default fixedLocation="false". That means
the
>>>>>>> content will be injected in the overall structure defined by
the
>>>>>>> structurer (*.fv), the content is structure aware.
>>>>>>
>>>>>>
>>>>>>
>>>>> A similar problem is with hooks. Till now we assumed that all hooks go
>>>>> into /html/body but this need to be more flexible. I propose to add a
>>>>> new attribute @hooksXpath to the forrest:view.
>>>>
>>>>
>>>>
>>>> I'm not sure I can see a use case for this, I'll respond assuming 
>>>> you have one, but an example may help.

Here's another use case that just emerged for me, I wonder if your 
proposal can cope with this one.

The output format is still HTML, but I want to be able to insert the 
output of a contract (and hook) at a specific point in the document. The 
contract provides a form field for adding notes to a document. So I 
might have a source document like this:

<document>
   ...
   <body>
     <section id="overview">
       <title>Overview</title>
       ...
     </section>
     <section id="background">
       <title>Background</title>
       ...
     </section>
<document>

What I might want output is this:

<html>
   ...
   <body>
     <div id="overview">
       <h1>Overview</h1>
       ...
       <div id="overviews-notes">
         <!-- content from contract here -->
       </div>
     </div>

     <div>
       <h1>Background</h1>
       ...
       <div id="overviews-notes">
         <!-- content from contract here -->
       </div>
     </div>
   <body>
   ...
<html>

Since the contract is inserted into a number of places with different 
properties depending on the structure of the original source file I 
expect that the structurer will be dynamically created by my project 
sitemap.

My question is can I create a structurer that will insert the contract 
output into the page content in this way? If so what would it look like?

Ross


Mime
View raw message