cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conal Tuohy" <con...@paradise.net.nz>
Subject RE: Xpath translate...
Date Sun, 30 Mar 2003 20:03:18 GMT
Hi João,

one pattern I've used in this situation is to assemble the query URL in
XSLT, rather than in the sitemap.

First, you use the RequestGenerator to produce an XML document describing
the query.
Second, your XSLT transforms this document into an Xinclude statement
containing the new query URL.
Third, you use the XInclude transformer to execute this query.
Then format the results as necessary and serialize.

Cheers!!

Con


> -----Original Message-----
> From: João César [mailto:joaocesar@duploclique.com]
> Sent: Monday, 31 March 2003 03:24
> To: cocoon-users@xml.apache.org
> Subject: Xpath translate...
>
>
> Hi, after trying this {request:translate(query, '+', ' ')}, I
> don't get any
> result from my search... I've tried to see if translate was
> working but with
> no sucess..
>
> What I'm trying to do is, parsing this querystring:
>
> search?query=transgenic+rice
>
> to:
>
> <map:generate type="file"
> src="http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db
> =pubmed&amp;te
> rm={request:translate(query, '+', ' ')}&amp;retmax=200"/>
>
> to match:
>
> http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubm
ed&term=transg
enic%20rice&retmax=200

TIA

Joao Cesar
joaocesar@netcabo.pt





---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message