Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mitra 81 posts 196 karma points
    Oct 29, 2013 @ 13:46
    Mitra
    0

    RSS Feed

    Hello,

    I just noticed that my RSS page shows some code after the news items at the bottom of the page JUST in google chrome. this is my code. anybody knows why? :(

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>

    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:rssdatehelper="urn:rssdatehelper"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:content="http://purl.org/rss/1.0/modules/content/"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


      <xsl:output method="xml" omit-xml-declaration="yes"/>

      <xsl:param name="currentPage"/>

      <!-- Update these variables to modify the feed -->
      <xsl:variable name="RSSNoItems" select="string('10')"/>
      <xsl:variable name="RSSTitle" select="string('iwonder RSS News Feed')"/>
      <xsl:variable name="SiteURL" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))"/>
      <xsl:variable name="RSSDescription" select="string(' iwonder management team, have over 40 years of experience working with insurance technology and have developed a range of products to help brokers and aggregators thrive')"/>

      <!-- This gets all news and events and orders by updateDate to use for the pubDate in RSS feed -->
         
      <xsl:variable name="publicationDate">
         
        <xsl:for-each select="$currentPage/* [@isDoc]">
           
          <xsl:sort select="@publicationDate" data-type="text" order="descending" />
          <xsl:if test="position() = 1">
            <xsl:value-of select="publicationDate" />
          </xsl:if>
           
        </xsl:for-each>
         
          <!--<xsl:for-each select="$currentPage/* [@isDoc]">  
     <xsl:if test="newsVisible = 1"> 
      <xsl:apply-templates/>            
     </xsl:if>    
    </xsl:for-each>-->

      </xsl:variable>

      <xsl:template match="/">
         
        <!-- change the mimetype for the current page to xml -->
        <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>

        <xsl:text disable-output-escaping="yes">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</xsl:text>
          <xsl:processing-instruction name="xml-stylesheet">type="text/css" href="/css/rss.css"</xsl:processing-instruction>

        <rss version="2.0"
        xmlns:content="http://purl.org/rss/1.0/modules/content/"
        xmlns:wfw="http://wellformedweb.org/CommentAPI/"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
          >
       
          <channel>
              <image>
              <!--<url>http://localhost/sitepix/structural/iwonder-logo.png</url>;
              <title>iwonder logo</title>
                  <link>./</link>
              <width>150</width>
              <height>130</height>
              <description>iwonder</description>-->
              </image>
            <Title>
              <xsl:value-of select="$RSSTitle"/>
            </Title>
            <link>
              <xsl:value-of select="$SiteURL"/>
            </link>
            <pubDate>
              <xsl:value-of select="$publicationDate"/>
            </pubDate>
            <generator>umbraco</generator>
            <description>
              <xsl:value-of select="$RSSDescription"/>
            </description>
            <language>en</language>

              <xsl:apply-templates select="$currentPage/news/* [@isDoc and string(umbracoNaviHide) != '1']">
              <xsl:sort select="@publicationDate" order="descending" />
              

            </xsl:apply-templates>
          </channel>
        </rss>

      </xsl:template>

      <xsl:template match="* [@isDoc]">
        <xsl:if test="position() &lt;= $RSSNoItems">
        <xsl:variable name="Visible" select="newsVisible" />
        <xsl:if test="$Visible = '1'" >
          <item>
            <Title>
              <xsl:value-of select="newsHeadline"/>
            </Title>
            <link>
              <xsl:value-of select="$SiteURL"/>
              <xsl:value-of select="umbraco.library:NiceUrl(@id)"/>
            </link>
            <pubDate>
              <xsl:value-of select="publicationDate"/>
            </pubDate>
            <!--<guid>
              <xsl:value-of select="$SiteURL"/>
              <xsl:value-of select="umbraco.library:NiceUrl(@id)"/>
            </guid> -->
            <content:encoded>
              <xsl:value-of select="newsSummary" disable-output-escaping="yes"/>
            </content:encoded>
          </item>
         </xsl:if>
        </xsl:if>
      </xsl:template>

    </xsl:stylesheet>

     

Please Sign in or register to post replies

Write your reply to:

Draft