From: David J. B. <djb...@pi...> - 2005-11-12 22:30:22
|
Dear Hans, > That sounds vaguely similar to the caching issue I encountered. If you > save the xq file without changing it (just after the first request) > (or change it in a trivial way, by adding a space in a comment), does > the query then work immediately? No. The only strategy that lets me use the query again is waiting. During development of some other XQuery scripts I had encountered what seemed to be a different (but perhaps related?) problem. Specifically, if I ran a script, then edited it, and then ran it again, the old version was executed, apparently because it had been cached and the caching mechanism wasn't aware that the file had changed. If I waited a few minutes, the system would read the new one. To work around this I had to save the file under different names each time I modified it. Very inconvenient. What's different here is that the problem is inconvenient not just for the developer, but also for the user. The user will get the desired results the first time, but when he tries to reload the page, with or without changes, he'll get only partial results. He'll have to wait a couple of minutes and then try reloading again if he wants to get the new results. Does this help pinpoint the source of the problem? Thanks, David ________ > On 11/12/05, David J. Birnbaum <djb...@pi...> wrote: >> Dear exist-open, >> >> I've written an XQuery script that generates SVG output in response to >> user input. The URL that gets passed to the XQuery script looks like: >> >> <http://localhost:8080/exist/mss2/plectogram.xq?1348=1&36nbb=3&771=2> >> >> The plectogram.xq form parses the passed parameters (which identify files >> on the system), sets up the value 1348 as parameter #1, 771 as parameter >> # 2, 36nbb as parameter #3, and passes this to an XSLT script in a >> $filenames variable as follows: >> >> transform:transform(<dummy/>,"stylesheets/multiplectogram.xsl",$filename >> s) >> >> (Note that all meaningful input into the transformation actually comes >> from the parameters; the "source XML" is just a placeholder.) >> >> This works, except that the results appear to be cached in a peculiar >> (and ultimately fatal) way. When I fire off the query the first time, >> the SVG is formatted and returned correctly. If I hit "reload" in my >> browser, though, I get a damaged file (some of the data is returned and >> some isn't). This also happens if I change the parameter values, e.g., >> by swapping them. If I wait a couple of minutes, depress the shift key, >> and hit the reload button, I get the correct result (but only if I wait >> that couple of minutes and only if I depress the shift key). I made >> copies of plectogram.xq that I called plectogram1.xq and plectogram2.xq, >> and if I change the parameters and change the xq file that I call, I get >> the correct results. >> >> In my sitemap I've placed the match for plectogram*.xq in a non-caching >> pipeline (<map:pipeline type="noncaching">), so I think what I'm >> experiencing is caching by eXist, rather than general caching by Cocoon. >> I would have thought that changing the tail of the URL would >> automatically turn off caching, since what I'm calling is, after all, a >> different URL, but that apparently isn't the case. >> >> Any idea how I can work around this problem? I'm using the 2005-10-26 >> snapshot of eXist on Windows 2000 and Fedora 2 platforms (same results on >> both). I'd be happy to supply copies of the files to anyone who might be >> able to help me troubleshoot this problem, but because everything works >> the first time, it only fails when I retry, and it works again after a >> pause, I'm guessing that the problem is with how I've configured eXist, >> and not with my particular XML data, XSLT stylesheet, or XQuery script. >> >> Thanks, >> >> David >> >> ________ >> >> Professor David J. Birnbaum >> Department of Slavic Languages and Literatures >> 1417 Cathedral of Learning >> University of Pittsburgh >> Pittsburgh, PA 15260 USA >> Voice: 1 412 624 5712 >> Fax: 1 412 624 9714 >> Email: djb...@pi... >> URL: http://clover.slavic.pitt.edu/~djb/ >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: >> Tame your development challenges with Apache's Geronimo App Server. >> Download it for free - -and be entered to win a 42" plasma tv or your >> very own Sony(tm)PSP. Click here to play: >> http://sourceforge.net/geronimo.php >> _______________________________________________ >> Exist-open mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-open >> ________ Professor David J. Birnbaum Department of Slavic Languages and Literatures 1417 Cathedral of Learning University of Pittsburgh Pittsburgh, PA 15260 USA Voice: 1 412 624 5712 Fax: 1 412 624 9714 Email: djb...@pi... URL: http://clover.slavic.pitt.edu/~djb/ |