From: Hungerburg <pc...@my...> - 2012-09-02 07:53:46
|
Am 2012-09-02 03:05, schrieb ron.vandenbranden: > > I'm facing an urgent issue w.r.t. the URL rewriting framework. When a > controller passes the output from an XQueryServlet to an XSLTServlet, > apparently, the context for the XSLTServlet url is interpreted > differently on Windows and Linux. Windows OK, Linux Fail: > <forward url="{$exist:controller}/xquery/test.xq"/> > <set-attribute name="xslt.stylesheet" value="../xslt/test.xsl"/> > Stylesheet not found (URL: > file:/vhosts/mydomain/webapps/exist/controller_test/xml/../xslt/test.xsl) Linux OK, Windows Fail: > <forward url="{$exist:controller}/xquery/test.xq"/> > <set-attribute name="xslt.stylesheet" value="{$exist:controller}/xslt/test.xsl"/> > Stylesheet not found (URL: > file:/F:/exist/webapps/exist/controller_test/xml/controller_test/xslt/test.xsl) I tried in a linux shell "ls not-existing/.." and if fails, while in a windows cmd prompt "dir not-exist\.." list the contents of "." - That may explain the first case. I notice in the last line of the second case a *doubling* of what is very likely the value of $exist:controller ("/controller_test"), isnt it? I guess that the "/xml" that shows up both times comes from the request. You have to get rid of this, because ".." will fail, as soon as you request "/xml/y/z.html" anyways. So absolute path-names is the way to go IMO. In a controller, I anchor style paths at "concat($exist:root, $exist:controller)", but I also have xq and xslt in the db, not the filesystem. Did you try to output just what test.xq produces without an xsl-transform? If that works equally on both systems, then possibly, its only the xslt servlet, that interprets path differently? I also found it very useful to see what the automatic values are: <dummy> <v>exist:root: {$exist:root}</v> <v>exist:prefix: {$exist:prefix}</v> <v>exist:controller: {$exist:controller}</v> <v>exist:path: {$exist:path}</v> <v>exist:resource: {$exist:resource}</v> </dummy> They should be the same on both windows and linux. HTH PS: you can increase the performance of the process by using 1) <set-attribute name="xquery.attribute" value="model"/> 2) <set-attribute name="xslt.input" value="model"/> in the respective forwards. -- peter |