|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Need help regarding RSS feed in forrestHi i am trying to include RSS feed in my website. But the explanation given in the apache forrest site is not clear. I am follwoing this..
Example: integrating external RSS content Similar to the previous example, we can integrate RSS into our site simply by providing a match in our project sitemap.xmap ... <?xml version="1.0"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <map:pipelines> <map:pipeline> <map:match pattern="**weblog.xml"> <map:generate src="http://blogs.cocoondev.org/stevenn/index.rss"/> <map:transform src="{forrest:stylesheets}/rss2document.xsl"/> <map:serialize type="xml"/> </map:match> <map:match pattern="......."> <!-- handle other project-specific matches --> </map:match> </map:pipeline> </map:pipelines> </map:sitemap> You will probably want to copy the core Forrest rss2document.xsl to your project, customise it to your needs, and refer to it with src="{project:resources.stylesheets}/rss2document.xsl". Then of course you would add an entry to site.xml to link to weblog.html Here i not able to understand 2 things one is "<map:match pattern="**weblog.xml">" where will i keep this weblog.xml" file and how will i map this to "site.xml" as explained above(Then of course you would add an entry to site.xml to link to weblog.html ) . i have a very simple site.xml attached with this. Please guide me Thanks in advance site.xml |
|
|
Re: Need help regarding RSS feed in forrestmanojm_singh wrote:
> Hi i am trying to include RSS feed in my website. But the explanation given > in the apache forrest site is not clear. I am follwoing this.. This is a simple example. you may prefer to use the feeder plugin which provides more flexible facilities for embedding RSS. See http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.input.feeder/ > > Example: integrating external RSS content > Similar to the previous example, we can integrate RSS into our site simply > by providing a match in our project sitemap.xmap ... > > <?xml version="1.0"?> > <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> > <map:pipelines> > <map:pipeline> > > <map:match pattern="**weblog.xml"> > <map:generate src="http://blogs.cocoondev.org/stevenn/index.rss"/> > <map:transform src="{forrest:stylesheets}/rss2document.xsl"/> > <map:serialize type="xml"/> > </map:match> > > <map:match pattern="......."> > <!-- handle other project-specific matches --> > </map:match> > </map:pipeline> > </map:pipelines> > </map:sitemap> > You will probably want to copy the core Forrest rss2document.xsl to your > project, customise it to your needs, and refer to it with > src="{project:resources.stylesheets}/rss2document.xsl". Then of course you > would add an entry to site.xml to link to weblog.html > > Here i not able to understand 2 things one is "<map:match > pattern="**weblog.xml">" where will i keep this weblog.xml" file and how > will i map this to "site.xml" as explained above(Then of course you would > add an entry to site.xml to link to weblog.html ) . It sounds like you need to start at the basics. In order to work with sitemaps you need to understand the sitemap language. Start here http://forrest.apache.org/docs_0_90/sitemap-explain.html If you are still having problems after reading that then ask again. However, it is worth noting that if you use the feeder plugin (see above) then you don't need to touch the sitemap. Ross |
|
|
Re: Need help regarding RSS feed in forrestHi rgardler thanks for the reply. I followed the link provided by u and did the same but not able to render the RSS feeds. I did like this
My feedDescriptor is like this and i put it in a folder like -> xdocs\ConnectM\Technology\feedDescriptor.xml <?xml version="1.0" encoding="UTF-8"?> <feedDescriptor> <feed id="BBCSport_UK"> <url>http://news.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml#</url> </feed> </feedDescriptor> and i have made an entry in site.xml like this <technology label="Technology" href="ConnectM/Technology/" tab="Technology"> <overview label="Overview" href="technology.html" /> <m2m label="M2M" href="m2m.html" /> <java label="Java" href="java.html" /> <java label="RSS Link" href="Rss.html" /> </technology> where Rss.xml is the feed xml file. Whenever i click on "RSS Link" nothing is getting displayed. Please help......
|
|
|
Re: Need help regarding RSS feed in forrestmanojm_singh wrote:
> Hi rgardler thanks for the reply. I followed the link provided by u and did > the same but not able to render the RSS feeds. I did like this > My feedDescriptor is like this and i put it in a folder like -> > xdocs\ConnectM\Technology\feedDescriptor.xml > > <?xml version="1.0" encoding="UTF-8"?> > <feedDescriptor> > <feed id="BBCSport_UK"> > > <url>http://news.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml#</url> > </feed> > </feedDescriptor> > > and i have made an entry in site.xml like this > > <technology label="Technology" href="ConnectM/Technology/" tab="Technology"> > <overview label="Overview" href="technology.html" /> > <m2m label="M2M" href="m2m.html" /> > <java label="Java" href="java.html" /> > <java label="RSS Link" href="Rss.html" /> > </technology> > > > where Rss.xml is the feed xml file. Whenever i click on "RSS Link" nothing > is getting displayed. > > Please help...... Doing what the instructions say will help, see http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.input.feeder/samples/singleFeed.html Your feed descriptor is OK, but your URL to request it is incorrect (as described in the above document): --- start quote --- <a href="PATH_TO_FEED_DESCRIPTOR/FEED_DESCRIPTOR_NAME.rss.EXTENSION> In this URL you must replace PATH_TO_FEED_DESCRIPTOR with the directory path to your feed descriptor file, FEED_DESCRIPTOR_NAME with the name of the descriptor file, and EXTENSION with the extension indicating the format you want the feed to be delivered in (i.e. html, pdf etc.) --- end quote --- so you need: <a href="ConnectM/Technology/feedDescriptor.rss.html"> This means your site.xml should be: <technology label="Technology" href="ConnectM/Technology/" tab="Technology"> <overview label="Overview" href="technology.html" /> <m2m label="M2M" href="m2m.html" /> <java label="Java" href="java.html" /> <java label="RSS Link" href="feedDescriptor.rss.html" /> </technology> To test this just do 'forrest run' and try: http://localhsot:8888/ConnectM/Technology/feedDescriptor.rss.html You don't mention it, so I will... you need to ensure you enable the plugin or it will never work, see http://forrest.apache.org/pluginDocs/plugins_0_90/usingPlugins.html Ross |
|
|
Re: Need help regarding RSS feed in forrestThanks a lot Ross. finally i made it.Thanks for ur help.
One more problem which i have already logged in the forum but unfortunately did not get an answer yet. Would u plz guide me on that? U can find that at this url http://www.nabble.com/need-help-on-lucene-search-tt14948038.html waiting for ur reply Thanks in advance
|
| Free Forum Powered by Nabble | Forum Help |