cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anna Afonchenko" <a...@ubaccess.com>
Subject Re: Generate html page from url in some file
Date Thu, 10 Apr 2003 13:40:27 GMT
Paul
Thanks for answering.

No, I don't want to change the links on the page.
Simply saying, I just want to take one link, fetch its url,
and use it in the pipeline, i.e. generate it, apply some xsl stylesheet and
serialize. So if cocoon pipeline is called with
http://www.url.com/links.html ,
what I actually want to produce is the result of pipeline whose
generator src will be http://www.url.com/test.html - which is actually
written in http://www.url.com/links.html .

Hope this time I explained myself better and hope that someone
will be able to help me.
This may be confusing, so I will be glad to present more specific example.

Thank you very much for help.

Anna

----- Original Message -----
From: "Paul Bowler" <paulbowler@www.aventix.co.uk>
To: <cocoon-users@xml.apache.org>
Sent: Thursday, April 10, 2003 2:27 PM
Subject: Re: Generate html page from url in some file


Anna,

I think I know what you mean, but correct me if I'm wrong.

You want to be able to make all the links in a remote web page point back to
your web app to a specific cocoon
pipeline.

So, if a remote page at http://www.url.com/links.html contains
<html>
...
<a href="http://www.url.com/test.html">link 1</a>
...
</html>

you can change it so that it actually look like
<html>
...
<a href="http://www.yourcocoonhost.com/cocoon/www.url.com/test.html">link
1</a>
...
</html>

Let me know if this is what you mean as I may have a solution.

Paul.

On Thu, 10 Apr 2003 15:09:31 +0200, Anna Afonchenko wrote
> 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 http://www.url.com/some.html that has a link <a
> href="http://www.url.com/test.html"/> 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/www.url.com/some.html"> <!-- some.html contains
the url of the desired page
> http://www.url.com/test.html -->    <map:generate
src="cocoon:/fetchPage/www.url.com/some.html" 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



--
Paul Bowler
Aventix Associates Ltd

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


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


Mime
View raw message