I want to look at an external rss feed and display it on my site but there’s some excessive information in there which I don’t want and I also want to add in my own content dependent on the content of the xml.
To try and make my explanation clearer a mock example would be an rss feed which includes the current day of the week and time. I would then want to pull that in, filter out the time to just have the day of the week, and replace that with an image relevant to the day of the week.
Edit: Okay, here is a possible example: Yahoo – Today’s weather rss
This shows the current weather in London (along with a short forecast). How would I look at the text attribute of the yweather:condition node and display an image relevant to it, so if it says “Fog” as it currently does, I would display an image of fog, if it said sun, an image of a sun, and so on.
Use:
where you have registered in your PL (that hosts the XPath engine) the prefix
"yweather", associated to the namespace"http://xml.weather.yahoo.com/ns/rss/1.0".XSLT-based verification:
when applied against the XML document pointed to by the link in the question:
produces the wanted result:
Update: The OP has now provided in a comment the exact wanted output. Below is the transformation that produces this output:
when this transformation is applied on the same XML document (above), the wanted result is produced: