Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Schema with some RTF fields in it. I need to provide a RSS feed for Components based on this Schema.

The problem is, the RTF fields contain some HTML markup and inline Component links (sometimes to multimedia Components - PDFs, images etc.). To satisfy the requirements I need to maintain these links in the RSS feed. Upon publishing I can see tags with tridion:href which are then resolved on the presentation side to regular links.

How do I parse/escape these links or any HTML content to make it XML compliant (replace < & > with &lt; & &gt; and similar)?

I am using SDL Tridion 2011 SP1 and Java on the presentation side.

share|improve this question
up vote 3 down vote accepted

Escaping would be a way as @user978511 suggests, but RSS feeds are valid XML, so you can simply keep the tridion:href attribute in your links as long as you add the appropriate namespace to your XML.

The correct namespace for the tridion prefix would be, you can add that to the rss root element of your feed XML:

<?xml version="1.0" ?>
<rss version="2.0" xmlns:tridion="">


You will need to adjust your Component/Page Template to keep the tridion:href attribute from being resolved. Most likely you currently have the Default Finish Actions Template Building Block in your Component Template, which contains the Link Resolver TBB, and that is responsible for resolving the link.

If you require a specific output, you have to create a custom Component Template (and possibly also a custom Page Template with that) to ensure you meet your requirements.

share|improve this answer
Thanks Bart, but the problem is the tridion:href attribute gets transformed into an actual HTML a:href after publishing which invalidates the XML. – Husain Zahid Jan 14 '14 at 9:26

The easiest way is to apply XSLT transformation to it. You can google a bit and find something like:

Just pick the most appropriate

share|improve this answer
Thanks for the quick response. Is there a way to do this without using XSLT? – Husain Zahid Jan 14 '14 at 9:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.