cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Using cocoon: source in <xsl:import>s
Date Mon, 18 Aug 2003 16:31:10 GMT
Phil Shafer wrote:

>Vadim Gritsenko writes:
>  
>
>>It's not concern of the resolver's user to fiddle with request / 
>>response. If change to be made, it should be done in cocoon source 
>>implementation.
>>    
>>
>
>This sounds right.
>
>  
>
>>I think reader has a right to make this call unconditionally.
>>    
>>
>
>If the resolver shouldn't fiddle with the response, why do they have
>the right to set the content length of the response?
>

Because reader should care less who invoked it. Reader should not change 
its behavior depending on caller. Cocoon protocol implementation should 
care about request / response it provides to reader, not the reader.


>>PS Are you using reader to deliver xsl:import parts? Have you tried 
>>generate/serialize pair, which does work?
>>    
>>
>
>I'm not making the reader, just trying to import a stylesheet using
>a "cocoon:/path" source. The reader is created in the callback
>resolver passed down to xalan. Here's a (very long) stacktrace:
>
>   Thread-25[1] where
>     [1] org.apache.coyote.Response.checkSpecialHeader (Response.java:386)
>     [2] org.apache.coyote.Response.setHeader (Response.java:361)
>     [3] org.apache.coyote.tomcat4.CoyoteResponse.setHeader (CoyoteResponse.java:1162)
>     [4] org.apache.coyote.tomcat4.CoyoteResponseFacade.setHeader (CoyoteResponseFacade.java:375)
>     [5] org.apache.cocoon.environment.http.HttpResponse.setHeader (HttpResponse.java:143)
>     [6] org.apache.cocoon.reading.ResourceReader.processStream (ResourceReader.java:254)
>     [7] org.apache.cocoon.reading.ResourceReader.generate (ResourceReader.java:292)
>     [8] org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processReader
(AbstractProcessingPipeline.java:615)
>     [9] org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process (AbstractProcessingPipeline.java:486)
>     [10] org.apache.cocoon.components.source.impl.SitemapSource.getInputStream (SitemapSource.java:276)
>     [11] org.apache.excalibur.xml.xslt.XSLTProcessorImpl.getInputSource (XSLTProcessorImpl.java:777)
>     [12] org.apache.excalibur.xml.xslt.XSLTProcessorImpl.resolve (XSLTProcessorImpl.java:704)
>

So, you *are* using a reader to read imported stylesheet. I'll repeat: 
have you tried generator/serializer pair? It *does* work.

<snip stacktrace/>


>So should the ResourceReader not touch the response?
>

No, it can touch it.


>Or should
>cocoon or excalibur be building a new internal-use response that
>ResourceReader can freely change since it will be discarded?
>

Yes, that's what should be happening (but it does not).


>Or is the problem somewhere else I'm not seeing?
>

Try the suggestion above.

Vadim



Mime
View raw message