This mail is an answer to this mail : Re: [Forum module] work with collection and Cinclude I modify the title in order to <map:match pattern="better"> to the discussion :
In order to seralize the stream before a transformation you suggest me to : > You have > <map:match pattern="*.xml/*/*/*/*"> > > So just request in your browser. The outcome should be xml and you can > see what goes into the transformation. but, in my opinion this tip has two "problems" 1 - the stream is "cut" when the map:serialize is throw 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 3 - when I do that in a module's sitemap (eg news module), I have the error page that display on the site 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 ? However, the debugDOC.xsl is a "one line" xml... that is not very friendly. I try to add a <xsl:output indent="yes"/> in the addSourceTags.xsl, but it's don't work... If you have any ideas : they are welcome !! ( I use the linux program xmlindent for create an indented debugDOC, but this is not very simple) Have a good day On Sat, 04 Oct 2008 22:58:49 +0200, Thorsten Scherler <[EMAIL PROTECTED]> wrote: > On Thu, 2008-10-02 at 01:20 +0200, Florent André wrote: >> Thank you for this answer Thorsten >> >> I will be more precise in the future. >> >> You ask me to give the xml file before .xsl. >> >> " >> > Put a <map:serialize type="xml"/> here to see what goes in >> > collection2html.xsl. >> " >> But I have a "problem" with <map:serialize> : If I put a <map:serialize> >> before collection2html.xsl, the serialized xml will be transform with > other >> <map:match> (the stream is redirected by other map:generator). > > I am talking about debugging. Meaning my suggestion is that you debug > just the one match not the whole pipeline. General rule of thumb for > debugging is keep it small to pin down the problem. > > You have > <map:match pattern="*.xml/*/*/*/*"> > > So just request in your browser. The outcome should be xml and you can > see what goes into the transformation. > > >> So, in order to display the stream before transformation by >> collection2html.xsl, I see this options : >> 1 - reorder the sitemap in order to have the collection2html in the last >> position -- I think it's a very bad solution >> 2 - use <map:view> -- I try that in the module's subsitemap : the result > in >> web-browser is : no content >> 3 - use a serializer that write a file on the file system -- What is the >> serializer defining in Lenya ? I search him in editor's sitemap, but I >> don't find it from now... >> > > All of the above sounds way too much fuzz. Just add the serializer, > request the match pattern and see what is the result. > > salu2 > >> >> And, for the : >> > >> > Yeah, see above basic violation of the whole concept of the pipeline. >> I guarantee you that I don't redo that ! >> >> have a good day >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > -- > Thorsten Scherler thorsten.at.apache.org > Open Source Java consulting, training and solutions > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]