You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Richard Lewis <ri...@fastmail.co.uk> on 2004/10/20 17:08:25 UTC
Request Parameters
Hi there,
I'm just trying to implement my site search engine but I've run into a
problem:
If, given the URI "http://host/?search=some+terms", this sitemap entry
<map:match type="request-parameter" pattern="search">
<map:generate src="content/content.en.xml" />
<map:select type="browser">
<map:when test="lynx">
<map:transform src="text/index.xsl">
<parameter name="terms" value="{request-param:search}" />
</map:transform>
</map:when>
<map:when test="explorer">
<map:transform src="ie/index.xsl">
<parameter name="terms" value="{request-param:search}" />
</map:transform>
</map:when>
<map:otherwise>
<map:transform src="default/index.xsl">
<parameter name="terms" value="{request-param:search}" />
</map:transform>
</map:otherwise>
</map:select>
<map:serialize type="html" />
</map:match>
will correctly pass the contents of the 'search' section of the URL
query string to the XSL stylesheet as 'terms', then the problem, that
all I get is a completely empty document, is probably to do with system
resources. I've checked the XSL by itself from the command line and it
returns the expected result (taking 3 or 4 seconds using Xalan 2.6).
Can anyone see any problems or might it just be system resources? If
so, is there a way to change how long Cocoon will wait for a stylesheet
to finish executing and where abouts in the logs would I find and
relevant error messages?
Thanks very much,
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Request Parameters
Posted by Christoph Kliemt <ch...@entici.de>.
Richard Lewis <ri...@fastmail.co.uk> writes:
> On Wednesday, October 20, 2004, at 04:35 PM, Christoph Kliemt wrote:
[...]
>> What about setting logging to debug-level and have a look at
>> sitemap.log or core.log?
>>
> OK, pretty weird: I set logging level for core to DEBUG, re-started
> Tomcat and then the search started working! So I went back and changed
> all the logging levels to ERROR, restarted Tomcat again and the search
> is still working.
>
> But how long will it carry on working.............who knows?
Simple. Always be sure to have enough pentacles in reach. ;-)
scnr
christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Request Parameters
Posted by Richard Lewis <ri...@fastmail.co.uk>.
On Wednesday, October 20, 2004, at 04:35 PM, Christoph Kliemt wrote:
> Richard Lewis <ri...@fastmail.co.uk> writes:
>
>> On Wednesday, October 20, 2004, at 04:14 PM, Christoph Kliemt wrote:
>>
>>> Richard Lewis <ri...@fastmail.co.uk> writes:
>>>
>>>
>>> [...]
>>>
>>>> will correctly pass the contents of the 'search' section of the URL
>>>> query string to the XSL stylesheet as 'terms', then the problem,
>>>> that
>>>> all I get is a completely empty document, is probably to do with
>>>> system resources. I've checked the XSL by itself from the command
>>>> line and it returns the expected result (taking 3 or 4 seconds using
>>>> Xalan 2.6).
>>>
>>> serialize as xml, html may hide something... ;-)
>>>
>> Hmm, tried that but it didn't make any difference.
>
> What about setting logging to debug-level and have a look at
> sitemap.log
> or core.log?
>
OK, pretty weird: I set logging level for core to DEBUG, re-started
Tomcat and then the search started working! So I went back and changed
all the logging levels to ERROR, restarted Tomcat again and the search
is still working.
But how long will it carry on working.............who knows?
Cheers for your help,
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Request Parameters
Posted by Christoph Kliemt <ch...@entici.de>.
Richard Lewis <ri...@fastmail.co.uk> writes:
> On Wednesday, October 20, 2004, at 04:14 PM, Christoph Kliemt wrote:
>
>> Richard Lewis <ri...@fastmail.co.uk> writes:
>>
>>
>> [...]
>>
>>> will correctly pass the contents of the 'search' section of the URL
>>> query string to the XSL stylesheet as 'terms', then the problem, that
>>> all I get is a completely empty document, is probably to do with
>>> system resources. I've checked the XSL by itself from the command
>>> line and it returns the expected result (taking 3 or 4 seconds using
>>> Xalan 2.6).
>>
>> serialize as xml, html may hide something... ;-)
>>
> Hmm, tried that but it didn't make any difference.
What about setting logging to debug-level and have a look at sitemap.log
or core.log?
hth christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Request Parameters
Posted by Richard Lewis <ri...@fastmail.co.uk>.
On Wednesday, October 20, 2004, at 04:14 PM, Christoph Kliemt wrote:
> Richard Lewis <ri...@fastmail.co.uk> writes:
>
>
> [...]
>
>> will correctly pass the contents of the 'search' section of the URL
>> query string to the XSL stylesheet as 'terms', then the problem, that
>> all I get is a completely empty document, is probably to do with
>> system
>> resources. I've checked the XSL by itself from the command line and it
>> returns the expected result (taking 3 or 4 seconds using Xalan 2.6).
>
> serialize as xml, html may hide something... ;-)
>
Hmm, tried that but it didn't make any difference. On Safari I got the
text "XML parsing error" formatted like an H1 but it claimed there was
no document source. On Mozilla on got a document that just went
"<html><body /></html>" (I just checked and I get the same thing on
Mozilla when serialize="html", but still no source at all on Safari [or
so it claims]).
Um, yeah. Hmmm......
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Request Parameters
Posted by Christoph Kliemt <ch...@entici.de>.
Richard Lewis <ri...@fastmail.co.uk> writes:
[...]
> will correctly pass the contents of the 'search' section of the URL
> query string to the XSL stylesheet as 'terms', then the problem, that
> all I get is a completely empty document, is probably to do with system
> resources. I've checked the XSL by itself from the command line and it
> returns the expected result (taking 3 or 4 seconds using Xalan 2.6).
serialize as xml, html may hide something... ;-)
hth christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org