On Thu, 09 Oct 2008 00:58:44 +0200, Thorsten Scherler <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-10-08 at 01:50 +0200, Florent André wrote:
>> This mail is an answer to this mail : Re: [Forum module] work with
>> collection and Cinclude
> 
> Next time just change the subject like:
> [Debugging] see the stream anywhere in a sitemap (was [Forum module]
> work with collection and Cinclude)

OK.

> ...
>1 - the stream is "cut" when the map:serialize is throw
> 
> Yes that is the whole idea of debugging.
> 
> Imaging a video of someone climbing a mountain and someone else
> recording it with a cam. If the climber falls and later analyze why, the
> most repeated part of this video probably is the one just before the
> fall. This is because the climber wants to learn why (s)he fall to not
> and fix this mistake in the future.

Yes, I'm agree with you, very good metaphor.

> 
> The quickest way to get a point in time of pipeline processing is
> terminating the match with a serialize. I do not care about what happens
> next since I need to determine the problem why the next is not working
> like I want.

When you have a grave bug (that throw an error page), I agree with this.
But when you have a little bug (the result is not exactly what you want), I
thing that is important to see the input and the output for study the
problem.

> 
>> 2 - when the sitemap has many "redirection" (=<map:generate
>> src="cocoon:/feedContent/news/{1}/{2}/{3}/{4}/{5}"/>) it's difficult to
>> write a well formed request in the browser
> 
> Make it static then. You are debugging. Do not debug the most abstract
> match. Create your own match="test" one and request what you need. I am
> talking all the time of debugging - I asked for the incoming xml of the
> problematic xsl.

For now, I don't see how I can request exactly the incoming xml that I
want. For example, If I had a "page2" in my publication that fire my bug, I
don't know how I can make a static match that request the page2 and process
it.

Maybe, you want to say that I have to debug my xmap out off Lenya ? (just
with Cocoon)

> 
>> 3 - when I do that in a module's sitemap (eg news module), I have the
> error
>> page that display on the site
> 
> What is the error? What is the url you request?

Ok, excuse me, I will be more precise in the future... but for this I
"lost" my modifications...

> 
> 
>> So, after some research in the lenya code, I found this solution :
>> Before the transformation put this code :
>>
>> <map:transform
>> src="fallback://lenya/xslt/authoring/edit/addSourceTags.xsl">
>>       <map:parameter name="source"
>> value="context://lenya/pubs/debugDOC.xsl"/>
>>  </map:transform>
>>     <map:transform type="write-source">
>>          <map:parameter name="serializer" value="xml"/>
>>    </map:transform>
>>  <map:transform
>> src="fallback://lenya/xslt/authoring/edit/removeSourceTags.xsl"/>
>>
>> and :
>> - the stream is writing in the pubs/debugDOC.xsl
>> - the sitemap processing is not disturbed
>>
>> What do you think about this solution ?
> 
> It does what I asked just with the write-source transformer. That is
> fine please post that to the other thread.
> 

I search on markmail, but I don't find the thread that you talk about...


Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to