title: Transform an external RSS feed with XSLT
body: <p>I have a blog hosted on wordpress and I want to be able to grab the RSS feed and parse it into another website using XSLT. I'm trying to parse it on the client side so I can just plug in the link to the feed and utilize it for real-time updates.</p>
  
  <p>Here's my html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
      function loadXMLDoc(dname){
          if (window.XMLHttpRequest){
              xhttp=new XMLHttpRequest();
          }else{
              xhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
  
          xhttp.open("GET",dname,false);
          xhttp.send("");
          return xhttp.responseXML;
      }
  
      function displayResult(){
          xml=loadXMLDoc("http://myBlog.wordpress.com/feed");
          xsl=loadXMLDoc("styles.xsl");
          // code for IE
          if (window.ActiveXObject){
            ex=xml.transformNode(xsl);
            document.getElementById("example").innerHTML=ex;
          }
          // code for Mozilla, Firefox, Opera, etc.
          else if (document.implementation &amp;&amp; document.implementation.createDocument){
              xsltProcessor=new XSLTProcessor();
              xsltProcessor.importStylesheet(xsl);
              resultDocument = xsltProcessor.transformToFragment(xml,document);
              document.getElementById("example").appendChild(resultDocument);
          }
      }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body onload="displayResult()"&gt;
          &lt;div id="example"/&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And here is my xsl doc that I am using to format the feed I am getting from my blog. When I view the HTML file I am not getting any errors, but the page is simply blank with nothing on it.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  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/"
  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:georss="http://www.georss.org/georss"
  xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
  xmlns:media="http://search.yahoo.com/mrss/"&gt;
  
  &lt;xsl:template match="/"&gt;
   &lt;html&gt;
   &lt;body&gt;
  &lt;xsl:for-each select="rss/channel/item"&gt;
      &lt;p&gt;
          &lt;xsl:value-of select="title"/&gt;
      &lt;/p&gt;
  &lt;/xsl:for-each&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p></p>