cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Bickerton <alec.bicker...@net-m.ch>
Subject Re: Support &amp; Traxtransformers
Date Sun, 13 Feb 2011 19:41:45 GMT
Hi Andreas,

I know this is the wrong approach, I'd like nothing more than to throw 
the whole mess away and start again. The situation is something that has 
evolved over many years but I'm trying to make as much of it sane as 
possible while not breaking the existing functionality.

http://cocoon.apache.org/2.1/userdocs/cinclude-transformer.html doesn't 
explain how I'd set the User-Agent, does this happen automagically?

As I stated previously, the url is generated dynamically inside xslt1 as 
an xsl variable and the document call is made from the same xslt. the 
result being copied as
<dynamic><xsl:value-of select="document($url)" /></dynamic>

If I understand what you're saying, I need to modify xslt1 to generate a 
"<cinclude:include src="url"/>" instead, and then use cinclude to fill 
in the blanks. Am I correct?

Regards,
Alec

On 02/12/2011 05:57 PM, kuehne@trustable.de wrote:
> Hi Alec,
>
> the document() function is always a bad approach !
> Try to use cocoon's own tools to aggregate the content. If it's a quasi-static content,
use map:aggregate with two ore more map:parts. If you calculate the target of your call sdynamically,
use the CInclude transformer.
>
> We used these approaches for a heavy-load productuon system and see very good performance
of the syetem.
>
> Greetings
>
> Andreas
>
> ----- original Nachricht --------
>
> Betreff: Support&  Traxtransformers
> Gesendet: Sa, 12. Feb 2011
> Von: Alec Bickerton<alec.bickerton@net-m.ch>

> Hi,
> We're running a number of sites using cocoon 2.1.9 and have problem with
> the TraxTransformer.
>
> We have some xslts that make use of document($url) to retrieve some data
> from an external service. The problem is that some of these external
> services require the useragent http-header to be propagated from the
> original request, in order to provide a device specific result.
>
> Having googled for what seems like days. I think this is possible to do
> with a URIResolver. Can anyone here suggest a way to do it ?
>
> e.g.
>
> request ->  generatorX ->  xslt1 ->  xslt2 ->  serialize
>
> xslt1 matches a DSL element and calls document(
> http://someservice/getscaledImageURLForUseragent )
>
> The service is provided by a third party, and xslt1 cannot be changed.
>
> Any help is much appreciated.
>
> Regards
> Alec


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


Mime
View raw message