You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Richard Cunliffe <ri...@cunliffe.net> on 2003/03/26 18:33:33 UTC
RSS
Hi,
I want to call a RSS feed. Is it possible for the style sheet to use the
XML document it is styling and the XML RSS feed.
How would I set up my sitemap to do this? And how would I call the two
different XML files in my style sheet?
Thanks,
Richard.
Re: RSS
Posted by Steven Noels <st...@outerthought.org>.
On 26/03/2003 18:33 Richard Cunliffe wrote:
> I want to call a RSS feed. Is it possible for the style sheet to use the
> XML document it is styling and the XML RSS feed.
>
> How would I set up my sitemap to do this? And how would I call the two
> different XML files in my style sheet?
I understand (please try to formulate your exact question better in the
future) that you want to use an RSS feed as a source. Your sitemap
should consider something like this:
<map:match pattern="myfeed.html">
<map:generate src="http://host/myfeed.rss"/>
<map:transform src="mystylesheet.xsl"/>
<map:serialize/>
</map:match>
when accessing this pipeline using http://host/cocoon/myfeed.html,
Cocoon will read the RSS feed and apply the mystylesheet.xsl onto it,
producing HTML (if that's what the stylesheet has been designed for).
I've recently written a (hopefully) layman's intro into Cocoon as a
paper for a conference, maybe some of it makes sense to you:
http://www.idealliance.org/europe/03/call/xmlpapers/02-01-05.14/.02-01-05.html
In case you want to really use the content of the RSS feed _inside_ your
XSLT stylesheet (as a variable perhaps), you should use the XSLT
document() function, for which you also can specify an URL as a source.
But all in all, since you have choosen for Cocoon, you might as well use
Cocoon aggregation or the various IncludeTransformers instead.
Hope this helps,
</Steven>
--
Steven Noels http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org stevenn at apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: RSS
Posted by Charles Yates <ce...@stanford.edu>.
Cut and Paste ugliness correction:
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="http://news.newsfeedsource.com/newsfeed.rss"/>
Charles Yates wrote:
> see http://www.w3.org/TR/xslt#document
>
> <xsl:apply-templates
> select="document('http://news.newsfeedsource.com/newsfeed.rss')/*"/>
> or something like that.
>
> also consider using XIncludeTransformer or CIncludeTransformer:
>
> <document>
> <stuff/>
> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="http://
> <http://www.reutershealth.com/eline.rdf>news.newsfeedsource.com/newsfeed.rss"/>
> <morestuff/>
> </document>
>
>
> <map:generate src="document.xml"/>
> <map:transform type="xinclude"/>
> <map:transform type="xsl" src="mystylesheet.xsl"/>
> <map:serialize/>
>
> Charles
>
>
> Richard Cunliffe wrote:
>
>> Hi,
>>
>>
>>
>> I want to call a RSS feed. Is it possible for the style sheet to use
>> the XML document it is styling and the XML RSS feed.
>>
>> How would I set up my sitemap to do this? And how would I call the
>> two different XML files in my style sheet?
>>
>>
>>
>>
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Richard.
>>
>
>
>
> ---------------------------------------------------------------------
> 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
Re: RSS
Posted by Charles Yates <ce...@stanford.edu>.
see http://www.w3.org/TR/xslt#document
<xsl:apply-templates
select="document('http://news.newsfeedsource.com/newsfeed.rss')/*"/>
or something like that.
also consider using XIncludeTransformer or CIncludeTransformer:
<document>
<stuff/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="http://
<http://www.reutershealth.com/eline.rdf>news.newsfeedsource.com/newsfeed.rss"/>
<morestuff/>
</document>
<map:generate src="document.xml"/>
<map:transform type="xinclude"/>
<map:transform type="xsl" src="mystylesheet.xsl"/>
<map:serialize/>
Charles
Richard Cunliffe wrote:
> Hi,
>
>
>
> I want to call a RSS feed. Is it possible for the style sheet to use
> the XML document it is styling and the XML RSS feed.
>
> How would I set up my sitemap to do this? And how would I call the two
> different XML files in my style sheet?
>
>
>
>
>
>
>
> Thanks,
>
>
>
> Richard.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
IGNORE THIS RE: RSS
Posted by Richard Cunliffe <ri...@cunliffe.net>.
IGNORE THIS
Richard
-----Original Message-----
From: Richard Cunliffe [mailto:richard@cunliffe.net]
Sent: 26 March 2003 17:34
To: cocoon-users@xml.apache.org
Subject: RSS
Hi,
I want to call a RSS feed. Is it possible for the style sheet to use the
XML document it is styling and the XML RSS feed.
How would I set up my sitemap to do this? And how would I call the two
different XML files in my style sheet?
Thanks,
Richard.