Results 1 to 2 of 2

Thread: XSL Not Working..why???

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Red face XSL Not Working..why???

    Using the XSL below why does my news feed NOT render the HTML tags? It just shows the markup itself, like the <i></i> tags and so on. Take a look at the news headline "15-Year-Old Dies After Taking Abortion Pill" at the words <i>Life News</i>:

    Code:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes"/>
    <xsl:param name="TITLE"/>
    
    <xsl:template match="rss">
      <!-- Do not show channel image -->
      <xsl:for-each select="channel/item">
        <br>
    
        <strong><a href="{link}" target="_blank"><xsl:value-of select="title"/></a></strong><br></br>
    
        <!-- only display markup for description if it's present -->
        <xsl:value-of select="description"/>
    		
        </br>
        <br></br>
      </xsl:for-each>
    </xsl:template>
    
    <xsl:template match="description">
      <br>
        <xsl:value-of select="."/>
      </br>
    </xsl:template>
    
    </xsl:stylesheet>
    http://www.reclaimamerica.org/PAGES/...Feeds/rss.aspx

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    Got it!

    This is the remedy.

    Code:
    <xsl:value-of select="description" disable-output-escaping="yes"/>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width