You need to sign in to do that
Don't have an account?
Pi
Want to implement extensions modules like Dublic Core tags and Content tags
Hi,
Please help me to create extension module tags as I'm implementing RSS feeds
I only want to implement 3 tags <content:encoded>, <dc:coverage> and <![CDATA[ ]]>.
I tried using methods but none of them are worked. I am implementing in VISUALFORCE.
Please check this http://boards.developerforce.com/t5/Force-com-Sites-Site-com/Using-HTML-Meta-tags-in-Visualforce-Page-for-Sites-REFRESH/td-p/156971
Twan thanks for your reply.
I'm sorry to say that I did'nt found anything useful from that link.
I want implement the following code
Please do help me
Thanks in advance
<rss xmlns:content="http://pusdfgrl.org/rss/1.0/modules/content/" xmlns:dc="http://pasdrl.org/dc/elements/1.1/" version="2.0">
Do you generate the xml in a controller ?
yes Twan
Could you show the VF & APEX code pls.
In below visualforce page I have implemented CDATA tag manually and for <dc:coverage> and <content:encoded> tags there is no colon which are hardcoded. When I tried with colon its giving error. Please fix this issue.
Please find below Apex controller and Visualforce page
Visualforce page:
<apex:page contenttype="text/xml" sidebar="false" showheader="false" controller="RssFeedController" >
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title> Today RSS feed</title>
<link>https://ap1.salesforce.com/a06/o</link>
<description>Philadelphia Today</description>
<apex:repeat value="{!sObjects}" var="cnt">
<item>
<title>{!cnt.title__c}</title>
<pubDate>{!cnt.pubDate__c}</pubDate>
<guid isPermaLink="false">{!cnt.guid__c}</guid>
<contentencoded>{!cnt.content__c}
<![CDATA[P>{!cnt.coverage__c}</P></P>]]>
</contentencoded>
<dccoverage>{!cnt.coverage__c}</dccoverage>
<link>{!cnt.link__c}</link>
<description>{!cnt.description__c}</description>
</item>
</apex:repeat>
</channel>
</rss>
</apex:page>
Apex Controller:
public class RssFeedController{
public List<Today__c> sObjects {get;set;}
public RssFeedController(){
sObjects = [SELECT Channel__c,content__c,coverage__c,description__c,guid__c,link__c,pubDate__c,title__c FROM Today__c
where Created_Date__c>=:system.today()-7 AND Created_Date__c<=:system.today()+31];
}
}
I suggest :
1. creating all the xml in the apex with the DOM apex object
http://www.salesforce.com/us/developer/docs/apexcodepre/Content/apex_xml_dom.htm
then create a string using toXmlString()
2. on visual force side, just output the generated string
Twan,
Thanks for your support.
I hope it'll work and please can you clarify that can I use 'colon' in that tags.
and now even I don't want to use any visualforce page and want to produce
direct xml output from apex class only, will that work??
If it works please could you assist me?
Thanks in advance
seems ok executing anonymously this :
06:58:36.040 (40412000)|USER_DEBUG|[4]|DEBUG|<?xml version="1.0" encoding="UTF-8"?><prefix:name xmlns:prefix="pop"><dc:coverage xmlns:dc="http://pasdrl.org/dc/elements/1.1/" /></prefix:name>