cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Petrie <>
Subject Re: Generate html page from url in some file
Date Thu, 10 Apr 2003 13:33:44 GMT
Rather than use the document() function in XSL try generating a 
CInclude with the first XSL transformation and then run that through a 
CInclude transformer.  That will bring the "fetched URL in as valid 


On Thursday, Apr 10, 2003, at 15:09 Europe/Berlin, Anna Afonchenko 

> Hi all.
> I have the following problem:
> I want to build a pipeline that will get a URL of some page, process 
> it with xsl
> that will fetch some other URL written in this page, generate the 
> fetched url and
> apply some xsl on it.
> E.g. if there is some file that has a 
> link <a href=""/>
> I want to fetch this url using xsl, and use it in other pipeline, 
> using cocoon protocol.
> I tried to use xsl document() function to get and output the content 
> of the desired url
> further through cocoon pipeline. But the problem arises when the 
> needed page is not valid xml, because then xsl cannot output it.
> So my question is, is it possible to do such task in cocoon?
> I want something like that:
> <map:match pattern="test/">
> <!-- some.html contains the url of the desired page 
> -->
>     <map:generate src="cocoon:/fetchPage/" 
> type="html"/>
>     <!-- pipeline fetchPage should get the content of the desired 
> page -->
>     <map:transform src="style.xsl"/>
>     <map:serialize type="html"/>
> </map:match>
> <map:match pattern="fetchPage/**">
>     <map:generate src="{1}" type="html"/>
>     <!-- fetch.xsl fetches the needed url and outputs it -->
>     <map:transform src="fetch.xsl"/>
>     <map:serialize type="xml"/>
> </map:match>
> The problem is, as I said, that the fetched url cannot be output by 
> xsl, as it is not
> in xml format.
> Is it possible to do something like this using cocoon pipelines?
> And how can I do this?
> Thank you very much for help.
> Sorry for a long e-mail. Hope I was able to explain myself :-)
> Anna
Darren Petrie

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message