In cocoon it is possible to do something like this:
<map:pipeline> <map:match pattern="*.vxml"> <map:generate src="voicexml/{1}.vxml"/> <map:transformsrc="transformers/{brs:clientbrowser}/w3voicebrowser.xsl"/> <map:call resource="serialize-{brs:clientbrowser}"/> </map:match> </map:pipeline> Where {1} represents the file name of the requested vxml resource {brs:clientBrowser} is a module that returns a string based on user-agent What is the best way to achieve the above with OPS? I was thinking that the user-agent detection for final serialization should take place in the epilogue. But for the transform {brs:clientbrowser} or the generator {1} filename not sure what is best here? Regards, Steve. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi Stephen,
With XPL, all the information that flows in a pipeline is in the form of XML documents. With the page flow, you can create an initial XML document that contains the part of the URL you are interested in. Create a template for that file, say instance.xml with just: <filename/> Then in the page flow use: <page path-info="(.*)\.vxml" matcher="oxf:perl5-matcher" default-submission="instance.xml" view="my-view.xpl"> <setvalue ref="/filename" matcher-group="1"/> </page> Then in my-view.xpl, you will get an "instance" input with <filename>...</filename>. With that you can use XSLT to generate a configuration for the file generator, connect that configuration to the file generator, and connect the output of the file generator to the "data" output of the pipeline. Then it seems that the XSLT transformation could be done in the epilogue. I hope this help, Alex On 1/9/06, Stephen Thwaites <[hidden email]> wrote: > In cocoon it is possible to do something like this: > > <map:pipeline> > <map:match pattern="*.vxml"> > <map:generate src="voicexml/{1}.vxml"/> > <map:transformsrc="transformers/{brs:clientbrowser}/w3voicebrowser.xsl"/> > <map:call resource="serialize-{brs:clientbrowser}"/> > </map:match> > </map:pipeline> > > Where {1} represents the file name of the requested vxml resource > {brs:clientBrowser} is a module that returns a string based on user-agent > > > What is the best way to achieve the above with OPS? > > I was thinking that the user-agent detection for final serialization should take > place in the epilogue. But for the transform {brs:clientbrowser} or the > generator {1} filename not sure what is best here? > > Regards, > Steve. > > > > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |