El mié, 21-09-2005 a las 13:27 +0200, HANAX escribió: > ______________________________________________________________________ > PÔVODNÁ SPRÁVA > Od: "Ross Gardler" <[EMAIL PROTECTED]> > Pre: dev@forrest.apache.org > Predmet: Re: voice plugin > Dátum/Čas: 20. 9. 2005 23:28:55 > > > Ross Gardler wrote: > > > HANAX wrote: > > > > > > ... > > > > >> Ok, this seems that I need to rewrite some simple files and change it > > >> to voice plugin or use voice plugin there? > > >> Sorry, I'am still lost... I have really big troubles to explain what > > >> can't I undertand :( Sorry. > > > > > > > > > No problem. I will create the contract to put some meta informatio into > > > head and commit it to the voice plugin. This will, hopefully serve as an > > > example for you. We can then guide you on porting your XSLT to that > > > contract. > > > > I've just created a skeleton contract for you [1]. All it does is place > > a new meta element in head, look at the source of any page in the voice > > plugin documentation and you'll see what I mean. > > > > Ok, I've got problem with SVN, I don't have latest versions... :( Now it's ok > and I see changes. But... I don't understand how forrest knows that it should > use voice.fv :)
in forrest.properties add # views is using a fallback mechanism for theming. # You can configure the theme name and its extension here project.theme-extension=.fv project.theme=voice Then we have a fallback mechanism to pick up that view definition file. The fallback is (default.fv is in your case voice.fv): /** * @param resolver * @param uri * *viewSelector* project-xdocs will return which view is * responsible for the requested path. If no view * (choice|fallback) could be found the template will return the * viewFallback (resources/views/default.fv). * * ex.: 1.request: index First choice: index.fv First/last fallback: * default.fv * * 2.request: sample/index First choice: sample/index.fv First fallback: * sample/default.fv Last fallback: default.fv * * 3.request: sample/subdir/index First choice: sample/subdir/index.fv First * fallback: sample/subdir/default.fv Second fallback: sample/default.fv * Last fallback: default.fv * * ... * * des.: The parent view (root-view) inherits to its children until a child * is overriding this view. This override can be used for directories * (default.fv) and/or files (*.fv). That means that the root view is the * default view as long no other view can be found in the requested child. * @throws IOException * @throws MalformedURLException * */ > In my site, I don't have this file and so that it does not contains added > META element neither changed title. Ross placed in the plugin you need to copy that. forrest-trunk/whiteboard/plugins/org.apache.forrest.plugin.output.voice/ |-- src | |-- documentation | | |-- content | | | `-- xdocs | | | |-- images | | | | `-- ... | | | |-- voice.fv ... > Should I have also voice.fv in site dir? What do you mean with site dir? > I'm confused - it seems that my plugin and voice plugin are somehow > unlinked... Hmmm, what is your plugin? > I can't explain good what I mean, sorry, but it's probably I still don't > understand well the "engine of plugins"... :) No problem just keep on asking, we will do the same. ;-) > > What you need to do (at least if I understand your work on voiceML) is > > use your existing XSLT code that generates the voiceML markup and use it > > in this contract. > > Yes this seems right way. > > > > > The template can operate on any part of the document just as it could > > before. To see how take a look at the "content-main" template that puts > > the body of a page into place [2] > > > > Great, finally I understand basics now :) Seems that now I need to split my > work to 2 contracts: > 1. to generate VoiceXML into header > 2. to generate body section of mxml file Actually you can do that within *one* contract. Just set @body and @head="true" > Now it raises one question for me, how this differs from creating two > stylesheets (one fore header and secodn for body) and place them one after > another? Maybe I miss some esential thing about views :) If you use a contract any view based project can request them. If you have one big stylesheet that is harder to archive. Contracts come with a description and a usage section this let other quickly understand what is going on. Basically a contract is just stylesheets that are focused on doing *one* certain task (e.g. output extra functionality to the overall site) HTH salu2 > > > > [1] http://svn.apache.org/viewcvs?rev=290568&view=rev > > [2] > > http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-main.ft?view=markup > > > -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)