cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Noels <stev...@outerthought.org>
Subject Re: RSS
Date Thu, 27 Mar 2003 21:19:42 GMT
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


Mime
View raw message