El vie, 23-09-2005 a las 11:26 +0100, Ross Gardler escribió:
> HANAX wrote:
> > As I understood, contracts are points where to place xsl templates.
> 
> Yes, templates, but not complete stylesheets...

Hmm yes and no. You need to rip of the templates of the stylesheet. Have
a look at
http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-section.ft?view=markup

> > I noticed some some structure naming convention but I can't find where it's 
> > explained. 
> 
> Because they are not, at least not in an easily accessible way. There 
> will be discussion in the mail archives, but they are not documented 
> anywhere. I'm afraid I can't tell you what they are.

First thread about naming convention:
http://marc.theaimsgroup.com/?l=forrest-dev&m=109535294600667&w=2

Another recent thread:
http://marc.theaimsgroup.com/?l=forrest-dev&m=111828155312385&w=2

We would really welcome that somebody would document it.  Patches
welcome. ;-)

> > Now my problem:
> > 1. Originally I had my template for generating "voice head"
> > 2. I have contract voice-markup.ft 
> > 3. I added my original voice stylesheet template under some 
> > forrest:template node in contract and rename it to voice-markup-head
> > 4. No results :(
> 
> What do you mean "no result", do you get any output at all?

Try to put a static output.

> 
> What does your contract look like now?
> 
> > 
> > If I look to some examples (plugins that use views and contracts), I note 
> > that all contracts are very small and I can't see any xsl manipulations...
> 
> Small because they are not doing major transformations, they are simply 
> working with specific parts of the source document. However, yours will 
> be much larger since you are processing the whole document into a new 
> format.

They will do what you made them to do.

> 
> Similarly, not all contracts do any XSL transformation stuff on the 
> source, some just add fixed content (like the search box for example). 
> For an example of a contract that does do transformations on the source see:
> 
> http://svn.apache.org/repos/asf/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-main.ft
> http://svn.apache.org/repos/asf/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-title.ft
> 
> > So what is the magic? How to link xsl processing with contract? Or am I 
> > totally wrong?
> 
> The short answer is that the templates defined in the view (voice.fv in 
> this case) are all pulled together to create a single stylesheet that is 
> applied to the source document.
> 
> For the full answer see:
> 
> http://marc.theaimsgroup.com/?l=forrest-dev&m=112612768505585&w=2
> 
> Note that views are a moving target and have changed a little since that 
>   mail, but the basic concept (and the part you are asking about) 
> remains the same.
> 
> Ross
> Ross
-- 
thorsten

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

Reply via email to