From: Ihe O. <ihe...@go...> - 2012-07-01 17:54:14
|
I have generated an XForm from XQuery and it is stored on the database at db/apps/b2b/test.xhtml XSLTForms is on the file system in the usual place at /eXist/webapp/xforms/xsltforms. After painstakingly and carefully reading the URL Rewriting and MVC framework I tried placing the following controller.xql (irrelevant parts have been snipped) on the database; firstly in the db/apps collection and latterly the db/apps/b2b collection. if ($exist:resource eq 'test.xhtml') then <dispatch xmlns="http://exist.sourceforge.net/NS/exist"> <view> <forward servlet="XSLTServlet"> (: Apply xsltforms.xsl stylesheet :) <set-attribute name="xslt.stylesheet" value="{$exist:root}/xforms/xsltforms/xsltforms.xsl"/> <set-attribute name="xslt.output.omit-xml-declaration" value="yes"/> <set-attribute name="xslt.output.indent" value="no"/> <set-attribute name="xslt.output.media-type" value="text/html"/> <set-attribute name="xslt.output.method" value="xhtml"/> <set-attribute name="xslt.baseuri" value="xsltforms/"/> <set-attribute name="xslt.xsltforms_home" value="webapp/xforms/xsltforms/"/> </forward> </view> <cache-control cache="yes"/> </dispatch> else something else ....... Despite this the XForm is not being transformed. I don't know what some of the set-attribute options mean (e.g the last two). I'm wondering whether they also need to be prefixed with {$exist:root} but I think I could use some enlightenment on precisely what is wrong. This will not be my final configuration, I'm just trying to get the simplest thing that works. |