I have the following code in my xsl file...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   " ">
	<!ENTITY copy   "©">
	<!ENTITY reg    "®">
	<!ENTITY trade  "™">
	<!ENTITY mdash  "—">
	<!ENTITY ldquo  "“">
	<!ENTITY rdquo  "”"> 
	<!ENTITY pound  "£">
	<!ENTITY yen    "¥">
	<!ENTITY euro   "€">
	<!ENTITY amp    "&">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:param name="ItemsPerPage" select="5" />
<xsl:template match="/">
  
  <xsl:for-each select="rss/channel/item[position() &lt;= $ItemsPerPage]">
  
  	<p style="font-family:Arial, Helvetica, sans-serif; color:#E37407; font-size:13px; font-weight:bold; margin:8px 0 0 0;">
    	<xsl:value-of select="title" /><br />
        	<span style="font-weight:bold; font-size:10px; color:#000">category: <xsl:value-of select="category" /></span>
        <br />
        <span style="font-size:10px; color:#000;">
        date: <xsl:value-of select="pubDate" />
        </span>
    </p>
    <p style="font-size:12px; font-family:Arial, Helvetica, sans-serif; padding:10px 0 10px 0;">
    	<xsl:value-of select="description" />
   	</p>
    <p style="font-size:10px; font-weight:bold;padding:10px 0 10px 0; border-bottom:1px dotted #DEDBD2;">
    	<a href="{link}">READ MORE</a>
   	</p>
  
  </xsl:for-each>
  
  </xsl:template>
</xsl:stylesheet>

It's a simple RSS writer... When to page is written out all of the formatting of the imported data from our wordpress blog ceases to exist... The <br />, &amp; , &mdash;, etc - all ignored...

http://www.changecompanies.net/news.php is the display page...

I believe I have it coded correctly... Anyone have any ideas?

Ted

Recommended Answers

All 2 Replies

Please show your input xml, the expected output and the current output. Your question is not clear.

I actually fixed my problem... I didn't have the disable-output-escaping="yes" inside my xsl statement...

I feel really dumb... I have changed this thread to solved and thank you, @mrame, for your help...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.