Hi Sjur, > -----Original Message----- > From: Sjur Moshagen [mailto:[EMAIL PROTECTED] > Sent: Thursday, 14 September 2006 11:10 PM > To: dev@forrest.apache.org > Subject: Re: i18n/dispatcher: language selection contract > > Den 14. sep. 2006 kl. 17.38 skrev Gav....: > > >> I have in my {$project}/resources/themes/pelt.fv the following > >> snippet: > >> > >> <forrest:hook class="languages">TEST > >> <forrest:contract name="language-variants" /> > >> </forrest:hook> > > > > Looks good, but I removed the word TEST. > > Ok. I already read the comment from Thorsten. > > >> for the hook. The first version of the contract, located in > >> {$project}/resources/themes/common/html/language-variants.ft, > >> contains the following: > > > > To be available for all themes this is the place to put it, but if > > You are only using it in pelt theme and only declaring it in pelt.fv > > Then putting it in /themes/pelt/html/language-variants.ft makes better > > Sense, but does not make any difference to this working or not as > > Common is fallback location, just thought I'd mention it. > > Thanks for informing me. I hope it would have common interest, if I > ever get it to work:-)
Absolutely :) > > >> I would hve expected it to output "SME", but nothing shows up. > > > > It is looking good, two things to note here, having the 'debug > > string -' > > Gives an error message output to the console and is a good help. > > console should be the terminal window in which I'm running forrest, > right? Yep. > > I can see no traces of that message on the console, nor in any log file. With the 'debug string-' I get :- cocoon://resolve.contract.html.language-variants; Line #0; Column #0; org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. And the SME no longer appears. If I remove 'debug string -' from the Contract then words SME appears as it should. Having now tested it further, it seems that where you put the words 'debug string -' makes a difference. You showed it as being :- <xsl:template match="/"> debug string - <forrest:content> Which is when I get the error message, moving it to :- <xsl:template match="/"> <forrest:content> debug string - cures this problem and my contract now works fine again, I get the words SME appear and the output is rendered as : <div id="languages"> <!--+ |start language list +--> <div class="language-variants"> SME </div> <!--+ |end language list +--> </div> > > > Unfortunatly it also makes this script fail, removing it cured it > > for me. > > I had/have no such problems.' > > > I also had a failure of > > > > <forrest:template xmlns:forrest="http://apache.org/forrest/ > > templates/1.0" > > > > because they were separate, this may be a cut-n-paste thing on my > > part if > > the mail was wrapped. > > Probably since I didn't have any such problems with the code:-) Ok, but then I don't understand why it works for me then and not for you, The 'debug string -' is the ONLY thing I have changed to make it work For me, have you tried removing it or moving it as above.? Thanks Gavin > > Sjur > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.12.3/446 - Release Date: 9/12/2006