I look after a site that advetisers jobs, the jobs have been created by using the same method of adding a news item as there are never going to be that many jobs. So in the content tab I have a jobs directory and under that are all the jobs.
The company now want the job information displayed in an rss feed, I have created the rss xslt file and can get the content pullled through but as there are quite a few values like job title, salary, employer, details I want to display these in the rss feed.
RSS XSLT Template Problems
Hi all,
I look after a site that advetisers jobs, the jobs have been created by using the same method of adding a news item as there are never going to be that many jobs. So in the content tab I have a jobs directory and under that are all the jobs.
The company now want the job information displayed in an rss feed, I have created the rss xslt file and can get the content pullled through but as there are quite a few values like job title, salary, employer, details I want to display these in the rss feed.
I have updated this:
<content:encoded>
<xsl:value-of select="concat('<![CDATA[ ', ./jobTitle,']]>')" disable-output-escaping="yes"/>
</content:encoded>
and say I want to add another value like job details how do I add this as if I just create a new xsl: value like below:
<content:encoded>
<xsl:value-of select="concat('<![CDATA[ ', ./jobTitle,']]>')" disable-output-escaping="yes"/>
<xsl:value-of select="concat('<![CDATA[ ', ./jobDetails,']]>')" disable-output-escaping="yes"/>
</content:encoded>
The output is on one line, how to I get it to go onto it's own line.
Thanks for any help
Lee
Hi Lee,
Not sure if you figured out how to resolve the issue?
I was going to suggest that you could make use of a setting in the <xsl:output> element called "cdata-section-elements"
This way the XSLT will automatically add the CDATA sections to the "content:encoded" elements, so you don't have to worry about the encoding/escaping.
Cheers, Lee.
Hi Lee,
Thank you for the reply, I found a solution but not a very elegant one, so your's will come in handy.
Thanks again.
Lee
is working on a reply...