Getting CDATA content which is a slideshow



I have an XML represented by this http://ift.tt/1pBxMoN. I was able to access the title and link via my xsl which looks like this



<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://ift.tt/tCZ8VR" version="1.0"
xmlns:media="http://ift.tt/W3lYmr">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<rss xmlns:georss="http://ift.tt/N7lROd" xmlns:twitter="http://api.twitter.com" xmlns:atom="http://ift.tt/r5ut6F" version="2.0">
<channel>
<author>
<xsl:text>Content-Feed-Pics</xsl:text>
</author>
<xsl:for-each select="rss/channel/item[position() &lt; 30]">
<item>
<title><xsl:value-of select="title"/></title>
<!--author><xsl:value-of select="dc:rss/dc:channel/dc:item/dc:creator"/></author-->
<!--icon>
<xsl:value-of select="concat(entities/media//media_url,':thumb')"/>
</icon-->


<link><xsl:value-of select="link"/></link>
<description><xsl:value-of select="description"/></description>
<pubDate><xsl:value-of select="pubDate"/></pubDate>
</item>
</xsl:for-each>
</channel>
</rss>
</xsl:template>


</xsl:stylesheet>



The two issues are to get the CDATA content for node which is a slideshow enclosed within % %. The second issue is there are certain nodes like and with namespaces. I tried adding dc: namespace to all the nodes in their path but the nodes were not getting accessed.


Kindly advise


No comments:

Post a Comment