var org = {p3k: ({url:"http://blog.aksw.org/feed/", xml:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- generator=\"wordpress/2.1\" -->\n<rss version=\"2.0\"\n\txmlns:content=\"http://purl.org/rss/1.0/modules/content/\"\n\txmlns:wfw=\"http://wellformedweb.org/CommentAPI/\"\n\txmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n\t>\n\n<channel>\n\t<title>blog.aksw.org</title>\n\t<link>http://blog.aksw.org</link>\n\t<description>The shared AKSW blog about our projects and the Semantic Web.</description>\n\t<pubDate>Sun, 05 Sep 2010 14:51:19 +0000</pubDate>\n\t<generator>http://wordpress.org/?v=2.1</generator>\n\t<language>en</language>\n\t\t\t<item>\n\t\t<title>AKSW coordinates EU-funded research project LOD2 aiming to take the Web of Linked Data to the next level</title>\n\t\t<link>http://blog.aksw.org/2010/aksw-coordinates-eu-funded-research-project-lod2-aiming-to-take-the-web-of-linked-data-to-the-next-level/</link>\n\t\t<comments>http://blog.aksw.org/2010/aksw-coordinates-eu-funded-research-project-lod2-aiming-to-take-the-web-of-linked-data-to-the-next-level/#comments</comments>\n\t\t<pubDate>Sun, 05 Sep 2010 14:51:19 +0000</pubDate>\n\t\t<dc:creator>S\xf6ren Auer</dc:creator>\n\t\t\n\t<dc:subject>Announcements</dc:subject>\n\t<dc:subject>Projects</dc:subject>\n\t\t<guid isPermaLink=\"false\">http://blog.aksw.org/2010/aksw-coordinates-eu-funded-research-project-lod2-aiming-to-take-the-web-of-linked-data-to-the-next-level/</guid>\n\t\t<description><![CDATA[All wealth of information is already widely available on the Internet or in company-wide Intranets. In many situations, however, we tend perceive this plethora of information as an information overload, since it is still rarely possible to answer search queries going beyond simple keyword-searches and tedious to integrate information from different sources in unforeseen ways. [...]]]></description>\n\t\t\t<content:encoded><![CDATA[<p>All wealth of information is already widely available on the Internet or in company-wide Intranets. In many situations, however, we tend perceive this plethora of information as an information overload, since it is still rarely possible to answer search queries going beyond simple keyword-searches and tedious to integrate information from different sources in unforeseen ways. Enabling such intelligent ways to process information on the Web is the key aim of the Semantic Web vision, but it seems that its realization based on logic and reasoning will take more time than initially anticipated.</p>\n<p>Recently however, the Linked Data paradigm - a more lightweight and pragmatic approach for integrating information on the Web - gained traction. It is based on representing information in facts consisting of subject, predicate and object (aka RDF triples), publishing these on the Web and interlinking them by using the same mechanism as linking between web pages (via URIs). With more than 20 billion facts thus already published as Linked Open Data (LOD) the document Web is enriched with a data commons comprising, for example, all the BBC programming, Wikipedia as a structured knowledge base (DBpedia) and statistical information from Eurostat and the US census.</p>\n<p>Co-funded by the European Union with 6.5 Million Euro as well as by companies and research institutions from 6 European countries the project LOD2 aims to realize the Web of Linked Data by developing crucial technological building blocks for the application of the Linked Data paradigm in companies, Web communities and governmental institutions. In particular, the LOD2 project will develop:</p>\n<ul>\n<li>enterprise-ready tools and methodologies for <i>exposing and managing </i>very large amounts<i> of structured information</i> on the Data Web,</li>\n<li>a <i>testbed and bootstrap networ</i>k of high-quality multi-domain, multi-lingual ontologies from sources such as Wikipedia and OpenStreetMap.</li>\n<li>algorithms based on machine learning for automatically <i>interlinking and fusing </i>data from the Web.</li>\n<li>standards and methods for reliably tracking<i> provenance</i>, ensuring <i>privacy</i> and <i>data security</i> as well as for assessing the <i>quality of information</i>.</li>\n<li>adaptive <i>tools for searching, browsing, and authoring</i> of Linked Data.</li>\n</ul>\n<p>The resulting tools, methods and data sets have the potential to change the Web as we know it today. This makes LOD2 relevant for researchers, industry and citizens alike. Whether it is about the efficient integration of enterprise data, the open-standardized access to scientific publications and experiment data or the opening of governmental data silos for the creative use by citizens, LOD2 will improve the usability of the Web for integrating heterogeneous information.</p>\n<p>The 4-year collaborative research and development project, which is coordinated by the AKSW research group from Universit&#228;t Leipzig starts in September 2010. Involves the partners <i>Centrum Wiskunde &amp; Informatica</i> from the Netherlands, <i>National University of Ireland, Galway</i>, <i>Freie Universit&#228;t Berlin</i>, UK-based <i>OpenLink Software</i>, <i>Semantic Web Company</i> from Vienna, the Belgian IT service provider<i>TenForce</i>, the french specialist for Enterprise search <i>Exalead</i>, the international publishing house <i>Wolters Kluwer </i>as well as the non-profit NGO<i> Open Knowledge Foundation</i>.</p>\n<p>For companies and organizations owning large datasets of public interest and interested in publishing and interlinking these on the Data Web, the LOD2 partners offer a Linked Open Data Starter Service (LODS). The application deadline for this free consulting and development support is 15th of December 2010. Further information is available from the LOD2 website <a href=\"http://lod2.eu\">http://lod2.eu</a>.</p>\n]]></content:encoded>\n\t\t\t<wfw:commentRss>http://blog.aksw.org/2010/aksw-coordinates-eu-funded-research-project-lod2-aiming-to-take-the-web-of-linked-data-to-the-next-level/feed/</wfw:commentRss>\n\t\t</item>\n\t\t<item>\n\t\t<title>Triplification Challenge Winners</title>\n\t\t<link>http://blog.aksw.org/2010/triplification-challenge-winners-2/</link>\n\t\t<comments>http://blog.aksw.org/2010/triplification-challenge-winners-2/#comments</comments>\n\t\t<pubDate>Fri, 03 Sep 2010 10:32:18 +0000</pubDate>\n\t\t<dc:creator>S\xf6ren Auer</dc:creator>\n\t\t\n\t<dc:subject>Triplify</dc:subject>\n\t\t<guid isPermaLink=\"false\">http://blog.aksw.org/2010/triplification-challenge-winners-2/</guid>\n\t\t<description><![CDATA[Today we announced the winners of this year&#8217;s Triplification Challenge, which have been selected from 23 submissions.\nOpen Government Data Track\n\n Winner: Richard Cyganiak, Fadi Maali and Vassilios Peristeras, &#8220;Self-Service Linked Government Data with dcat and Gridworks&#8221;\n Honorary Mention: Christoph Boehm, Felix Naumann, Markus Freitag, Stefan George, Norman H&#246;fler, Martin K&#246;ppelmann, Claudia Lehmann, Andrina Mascher and [...]]]></description>\n\t\t\t<content:encoded><![CDATA[<p>Today we announced the winners of this year&#8217;s Triplification Challenge, which have been selected from 23 submissions.</p>\n<p><strong>Open Government Data Track</strong></p>\n<ul>\n<li> Winner: Richard Cyganiak, Fadi Maali and Vassilios Peristeras, &#8220;Self-Service Linked Government Data with dcat and Gridworks&#8221;</li>\n<li> Honorary Mention: Christoph Boehm, Felix Naumann, Markus Freitag, Stefan George, Norman H&#246;fler, Martin K&#246;ppelmann, Claudia Lehmann, Andrina Mascher and Tobias Schmidt, &#8220;Linking Open Government Data: What Journalists Wish They Had Known&#8221;</li>\n<li> Honorary Mention: Alexander De Leon, Victor Saquicela, Luis M. Vilches-Bl\xe1zquez, Boris Villaz\xf3n-Terrazas, Freddy Priyatna, Oscar Corcho, Carlos Buil, Jose Mora and Jean Paul Calbimonte, &#8220;Geographical Linked Data: a Spanish Use Case&#8221;\n</li>\n</ul>\n<p><strong>Open Track<br />\n</strong></p>\n<ul>\n<li>Winner: Danh Le Phuoc, &#8220;Live Open Linked Sensor database&#8221;</li>\n<li>Winner: Pablo Mendes, Pavan Kapanipathi and Alexandre Passant, &#8220;Twarql: Tapping Into the Wisdom of the Crowd&#8221;</li>\n<li>Honorary Mention: Oktie Hassanzadeh, Reynold S. Xin, Christian Fritz, Yang Yang and Ren\xe9e J. Miller, &#8220;Bib Base Triplified&#8221;\n</li>\n</ul>\n<p>We thank all participants for their submissions, which were of extraordinary high quality, and we also thank the members of the reviewer committee for their help in selecting the winners. We are also increadibly thankful to the sponsors of this years prices: <a href=\"http://www.wolterskluwer.de/de/html/content/17/Startseite/\">Wolters Kluwer, <a href=\"http://semtech2010.semanticuniverse.com/\">Semantic Universe</a>.</p>\n<p></a>We are very looking forward to next year&#8217;s challenge, which will again be organized in conjunction with the annual I-Semantics conference in Graz in September 2011.</p>\n]]></content:encoded>\n\t\t\t<wfw:commentRss>http://blog.aksw.org/2010/triplification-challenge-winners-2/feed/</wfw:commentRss>\n\t\t</item>\n\t\t<item>\n\t\t<title>DL-Learner Build 2010-08-07 released</title>\n\t\t<link>http://blog.aksw.org/2010/dl-learner-build-2010-08-07-released/</link>\n\t\t<comments>http://blog.aksw.org/2010/dl-learner-build-2010-08-07-released/#comments</comments>\n\t\t<pubDate>Sat, 07 Aug 2010 11:32:12 +0000</pubDate>\n\t\t<dc:creator>Jens Lehmann</dc:creator>\n\t\t\n\t<dc:subject>Announcements</dc:subject>\n\t<dc:subject>Software Releases</dc:subject>\n\t<dc:subject>Projects</dc:subject>\n\t<dc:subject>DL-Learner</dc:subject><dc:subject>description logics</dc:subject><dc:subject>DL Learner</dc:subject><dc:subject>ilp</dc:subject><dc:subject>ore</dc:subject><dc:subject>Protege</dc:subject><dc:subject>Release</dc:subject><dc:subject>Research</dc:subject>\n\t\t<guid isPermaLink=\"false\">http://blog.aksw.org/2010/dl-learner-build-2010-08-07-released/</guid>\n\t\t<description><![CDATA[We are happy to announce the next release of DL-Learner, a tool for learning OWL class expressions from examples and background knowledge. It extends Inductive Logic Programming (ILP) to Description Logics and the Semantic Web. The tool has matured over the past 3 years and is meanwhile used in a number of applications. Some features [...]]]></description>\n\t\t\t<content:encoded><![CDATA[<p>We are happy to announce the next release of <a href=\"http://dl-learner.org\">DL-Learner</a>, a tool for learning <a href=\"http://www.w3.org/TR/owl2-syntax/#Class_Expressions\">OWL class expressions</a> from examples and background knowledge. It extends Inductive Logic Programming (ILP) to Description Logics and the Semantic Web. The tool has matured over the past 3 years and is meanwhile used in a number of applications. Some features of this release are:</p>\n<ul>\n<li>support for OWL API 3 and OWL 2</li\n<li>ORE (ontology repair and enrichment) tool based on DL-Learner algorithms (soon to be migrated to an own project)</li>\n<li>several new heuristics, e.g. generalised F-Measure, and efficient stochastic heuristic approximation methods</li>\n<li>learning algorithms for the EL description logic</li>\n<li>support for hasValue construct in combination with string datatype</li>\n<li>support for refining existing definitions (instead of learning from scratch) for CELOE ontology engineering algorithm</li>\n<li>support for direct Pellet 2 integration and reasoners connected via OWLlink</li>\n<li>more unit tests, bug fixes and features</li>\n</ul>\n<p>DL-Learner can be used to:</p>\n<ul>\n<li>solve general supervised Machine Learning problems using ontologies as background knowledge (given as OWL files, SPARQL endpoints, etc.), e.g. it was used to predict whether chemicals can <a href=\"http://dl-learner.org/wiki/Carcinogenesis\">cause cancer</a></li>\n<li>help knowledge engineers by learning definitions and subclass axioms (see the <a href=\"http://dl-learner.org/wiki/ProtegePlugin\">Protege plugin</a> and OntoWiki plugin)</li>\n<li>generating user recommendations when browsing knowledge bases</li>\n</ul>\n<p>I\u2019d like to thank all contributors, in particular active developers and everyone who sent us valuable feedback.</p>\n<p>The tool can be be <a href=\"https://sourceforge.net/projects/dl-learner/files/DL-Learner/Build%202010-08-07/dllearner-2010-08-07.tar.gz/download\">downloaded here</a>.</p>\n]]></content:encoded>\n\t\t\t<wfw:commentRss>http://blog.aksw.org/2010/dl-learner-build-2010-08-07-released/feed/</wfw:commentRss>\n\t\t</item>\n\t\t<item>\n\t\t<title>Networking Session on Governmental Linked Data at ICT2010</title>\n\t\t<link>http://blog.aksw.org/2010/networking-session-on-governmental-linked-data-at-ict2010/</link>\n\t\t<comments>http://blog.aksw.org/2010/networking-session-on-governmental-linked-data-at-ict2010/#comments</comments>\n\t\t<pubDate>Mon, 02 Aug 2010 11:11:35 +0000</pubDate>\n\t\t<dc:creator>S\xf6ren Auer</dc:creator>\n\t\t\n\t<dc:subject>Events</dc:subject>\n\t\t<guid isPermaLink=\"false\">http://blog.aksw.org/2010/networking-session-on-governmental-linked-data-at-ict2010/</guid>\n\t\t<description><![CDATA[The Open Knowledge Foundation Working Group on EU Open Data (where AKSW is an active member) is organising a session on linked government data at the ICT2010 event in Brussels later this year.\n\nWhere? T 003, Brussels Expo\nWhen? 11:00-12:30 CET, 28th September 2010\n\nThis networking session will discuss how public access to government data \u2013 crucial for [...]]]></description>\n\t\t\t<content:encoded><![CDATA[<p>The Open Knowledge Foundation <a href=\"http://wiki.okfn.org/wg/euopendata\">Working Group on EU Open Data</a> (where AKSW is an active member) is organising a <a href=\"http://ec.europa.eu/information_society/events/cf/ict2010/item-display.cfm?id=2790\">session on linked government data</a> at the ICT2010 event in Brussels later this year.</p>\n<ul>\n<li>Where? T 003, Brussels Expo</li>\n<li>When? 11:00-12:30 CET, 28th September 2010</li>\n</ul>\n<p>This networking session will discuss how public access to government data \u2013 crucial for an open and transparent society \u2013 can be improved.</p>\n<p>This session has been proposed by IT professionals, scientists and government representatives organised \u2013 under the auspices of the Open Knowledge Foundation \u2013 as the Working Group on EU Open Data. It aims to establish a forum for networking and exchanging ideas with regard to publishing and linking governmental data, identifying technological developments and showcasing successful cases of linked governmental data. Developments in linked data could help further integrate information published by regional, national and European public administrations. The session is thematically relevant to a number of pillars within the Framework Programme as well as the Competitiveness and Innovation Programme.</p>\n]]></content:encoded>\n\t\t\t<wfw:commentRss>http://blog.aksw.org/2010/networking-session-on-governmental-linked-data-at-ict2010/feed/</wfw:commentRss>\n\t\t</item>\n\t\t<item>\n\t\t<title>ORE 0.2 Released</title>\n\t\t<link>http://blog.aksw.org/2010/ore-02-released/</link>\n\t\t<comments>http://blog.aksw.org/2010/ore-02-released/#comments</comments>\n\t\t<pubDate>Tue, 27 Jul 2010 21:31:28 +0000</pubDate>\n\t\t<dc:creator>Jens Lehmann</dc:creator>\n\t\t\n\t<dc:subject>Announcements</dc:subject>\n\t<dc:subject>Software Releases</dc:subject>\n\t<dc:subject>Projects</dc:subject>\n\t<dc:subject>DL-Learner</dc:subject>\n\t<dc:subject>ORE</dc:subject><dc:subject>description logics</dc:subject><dc:subject>DL Learner</dc:subject><dc:subject>ontology debugging</dc:subject><dc:subject>ontology enrichment</dc:subject><dc:subject>ore</dc:subject><dc:subject>owl</dc:subject><dc:subject>Release</dc:subject><dc:subject>Screencast</dc:subject>\n\t\t<guid isPermaLink=\"false\">http://blog.aksw.org/2010/ore-02-released/</guid>\n\t\t<description><![CDATA[Today, we released version 0.2 of the ontology repair and enrichment (ORE) tool. It is a tool for knowledge engineers to improve an OWL ontology through a wizard like repair process and uses state-of-the-art ontology debugging methods. The main feature in version 0.2 is a mode for incrementally detecting inconsistencies in large knowledge bases available [...]]]></description>\n\t\t\t<content:encoded><![CDATA[<p>Today, we released version 0.2 of the ontology repair and enrichment (ORE) tool. It is a tool for knowledge engineers to improve an OWL ontology through a wizard like repair process and uses state-of-the-art ontology debugging methods. The main feature in version 0.2 is a mode for incrementally detecting inconsistencies in large knowledge bases available as SPARQL endpoints. Using this mode, we have detected inconsistencies and computed justifications in DBpedia Live and OpenCyc. Previously, both knowledge bases were too large to compute justifications on standard hardware to the best of our knowledge, i.e. inconsistencies could not be fixed efficiently. A <a href=\"http://dl-learner.org/files/screencast/ore/0.2/ore.htm\">screencast</a> illustrates this process for the case of DBpedia Live. Thanks to Lorenz B&#252;hmann for his work on ORE.</p>\n<p><a href=\"http://dl-learner.org/wiki/ORE\">ORE Homepage</a> | <a href=\"https://sourceforge.net/projects/dl-learner/files/ORE/0.2/ore-0.2.tar.gz/download\">Download</a> | <a href=\"http://dl-learner.org/files/screencast/ore/0.2/ore.htm\">Screencast</a> | <a href=\"http://aksw.org\">AKSW Homepage</a></p>\n]]></content:encoded>\n\t\t\t<wfw:commentRss>http://blog.aksw.org/2010/ore-02-released/feed/</wfw:commentRss>\n\t\t</item>\n\t</channel>\n</rss>\n", message:undefined, modified:(new Date(1284016313812)), baseUri:"http://p3k.org/rss/", query:"frameColor=black&textColor=black&_=1210183575389&titleBarColor=#cccc99&compact=&fontFace=&align=&showXmlButton=true&maxItems=5&boxFillColor=#ffffcc&undefined=&titleBarTextColor=black&width=250&url=http://blog.aksw.org/feed/", param:{textColor:"black", width:"250", align:"", fontFace:"", url:"http://blog.aksw.org/feed/", compact:"", frameColor:"black", showXmlButton:"true", undefined:"", boxFillColor:"#ffffcc", _:"1210183575389", titleBarColor:"#cccc99", maxItems:"5", titleBarTextColor:"black"}, box:"<table class=\"rssBox\" width=\"${width}\" bgcolor=\"${frameColor}\" \n      style=\"table-layout: fixed; overflow: hidden; font-family: ${fontFace};\" \n      align=\"${align}\" cellspacing=\"1\" cellpadding=\"7\" border=\"0\">\n<tr bgcolor=\"${titleBarColor}\">\n<td>\n   ${xmlButton}\n   <strong>${title}</strong>\n   <div>\n      <small style=\"color: ${titleBarTextColor};\">${date}</small>\n   </div>\n</td>\n</tr>\n<tr bgcolor=\"${boxFillColor}\">\n<td class=\"rssBoxContent\" style=\"color: ${textColor};\">\n   ${image}\n   ${items}\n   ${input}\n   <div class=\"rssBoxPromo\" style=\"margin-top: 0px; text-align: left; \n         font: 9px verdana, sans-serif\">\n      RSS box by <a href=\"http://p3k.org/rss\">p3k.org</a>.\n   </div>\n</td>\n</tr>\n</table>\n\n", image:"<a href=\"${link}\"><img src=\"${source}\" width=\"${width}\" height=\"${height}\" \nalt=\"${title}\" title=\"${title}\" align=\"${align}\" valign=\"${valign}\" \nhspace=\"${hspace}\" vspace=\"${vspace}\" border=\"0\" /></a>\n\n", input:"<form method=\"get\" action=\"${link}\">\n${description}\n<input type=\"text\" name=\"${name}\" size=\"15\" /> <input type=\"submit\" \nvalue=\"${title}\" />\n</form>\n\n", item:"<div class=\"rssBoxItemContent\">\n${title}\n${break}\n${description}\n${buttons}\n</div><br />\n\n", date:"${year}-${month}-${day}, ${hours}:${minutes}h\n\n", link:"<a class=\"${class}\" href=\"${link}\" style=\"${style}\">${text}</a>\n", error:"<?xml version=\"1.0\"?>\n<rss version=\"error\">\n   <channel>\n      <title>RSS Box Error</title>\n      <link>${link}</link>\n      <description>This output was automatically generated to report an error \n      that occurred during a request to the JavaScript RSS Box Viewer.</description>\n      <item>\n         <title>Oops, something went wrong...</title>\n         <description>An error occurred while processing the request to the \n         JavaScript RSS Box Viewer.</description>\n      </item>\n      <item>\n         <title>An error message was returned by the server.</title>\n         <description>${message}</description>\n      </item>\n      <item>\n         <description>Most likely, this might have happened because of a \n         non-existent or invalid RSS feed URL. Please check and possibly correct \n         your input, then try again.</description>\n      </item>\n   </channel>\n</rss>\n\n"})};
function debug(str) {
   return document.write('<p><span style="background-color: yellow;">', 
         str, '</span><p>');
}

org.p3k.RssBox = function() {
   var ref;
   var ISOPATTERN = /([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9:]+).*$/;
   
   var data = org.p3k;
   data.defaults = {
      url: "http://blog.p3k.org/rss",
      maxItems: 7,
      width: 200,
      align: "",
      frameColor: "black",
      titleBarColor: "lightblue",
      titleBarTextColor: "black",
      boxFillColor: "white",
      textColor: "black",
      showXmlButton: "",
      compact: ""
   };
   
   var baseUri = data.baseUri;
    
   var getColor = function(str) {
      if (str.length === 6 && parseInt(str, 16) && str.indexOf("#") !== 0) {
         str = "#" + str;
      }
      return str.toLowerCase();
   }

   var value;
   for (var i in data.defaults) {
      value = data.param[i];
      if (!value || value.length === 0) {
         data.param[i] = data.defaults[i];
      } else if (i.indexOf("Color") > 0) {
         data.param[i] = getColor(value);
      }
   }

   // FIXME: Ugly work-around for many boxes using too small width 
   // values because the former version did not show the exact output.
   if (data.param.javascript && data.param.width < 200) {
      data.param.width = 200;
   }
   // Remove obsolete parameters from param and query
   delete data.param.javascript;
   data.query = data.query.replace("javascript=true", "");   

   var NAMESPACES = {
      dc: "http://purl.org/dc/elements/1.1/",
      rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   };

   var getUrl = function(url) {
      url = baseUri + "proxy.r?" + encodeURIComponent(url);
   
      var HttpRequest = function() {
         return (typeof XMLHttpRequest !== "undefined") ?
            new XMLHttpRequest() : new ActiveXObject("Msxml2.XMLHTTP");
      }
   
      var request = new HttpRequest();
      request.open("GET", url, false);
      request.send(null);   
      if (!request.getResponseHeader("Date")) {
         var cached = request;
         var ifModifiedSince = cached.getResponseHeader("Last-Modified") || 
               new Date(0); // January 1, 1970
         request = new HttpRequest();
         request.open("GET", url, false);
         request.setRequestHeader("If-Modified-Since", ifModifiedSince);
         request.send("");
         if (request.status === 304) {
            request = cached; 
         }
      }
      return request;
   }
   
   var getDocument = function(source) {
      if (source) {
         if (document.implementation.createDocument) {
            var parser = new DOMParser();
            var doc = parser.parseFromString(source, "text/xml");
            return doc;
         } else if (window.ActiveXObject) {
            var doc = new ActiveXObject("Microsoft.XMLDOM");
            doc.async = "false";
            doc.loadXML(source);
            return doc;
         }
      }
      return null;
   }
   
   var getError = function() {
      var msg = null, root;
      if (!xml || data.message) {
         msg = data.message || "Unknown error.";
      } else if (xml.parseError && xml.parseError.errorCode) {
         msg = xml.parseError.reason; // IExplore
      } else if (root = xml.documentElement) {
         var errorNode;
         if (root.nodeName === "parsererror") {
            msg = xml.documentElement.textContent; // Mozilla
         } else if ((errorNode = root.childNodes[0]) && 
               errorNode.nodeName === "parsererror") {
            msg = errorNode.textContent; // Safari
         } else if (!/rss|rdf|scriptingNews/i.test(xml.documentElement.nodeName)) {
            msg = "Incompatible data format. Are you sure this is an RSS feed?";
         }
      }
      return msg;
   }
   
   var getNode = function(parent, name, namespace) {
      if (namespace) {
         if (typeof parent.getElementsByTagNameNS === "undefined") {
            var elements = parent.getElementsByTagName(namespace + ":" + name);
         } else {
            var elements = parent.getElementsByTagNameNS(NAMESPACES[namespace], name);
         }
      } else {
         var elements = parent.getElementsByTagName(name);
      }
      if (elements && elements[0]) {
         return elements[0];
      }
      return null;
   }
   
   var getText = function(node) {
      if (node && node.childNodes && node.childNodes.length > 0) {
         return node.childNodes[0].nodeValue || "";
      }
      return "";
   }
   
   var trim = function(str) {
      if (str) {
         return str.replace(/^\s*(\S*)\s*$/, "$1");
      }
      return "";
   }
   
   var padZero = function(n) {
      if (n < 10) {
         return "0" + n
      }
      return n;
   }

   var encodeXml = function(str) {
      if (!str) {
         return "";
      }
      return str.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, "&amp;");
   }
      
   var render = function(template, param) {
      if (!template || !param) {
         return template;
      }
      template = template.replace(/\$\{([^}]+)\}/g, function() {
         var key = arguments[1];
         return param[key] || "";
      });
      return template;
   }
   
   var renderDate = function(date) {
      if (date.constructor !== Date) {
         var str = String(date);
         var millis = Date.parse(str.replace(ISOPATTERN, "$1/$2/$3 $4"));
         if (millis) {
            date = new Date(millis);
         } else {
            date = new Date;
         }
      }

      return render(data.date, {
         year: date.getFullYear(),
         month: padZero(date.getMonth() + 1),
         day: padZero(date.getDate()),
         hours: padZero(date.getHours()),
         minutes: padZero(date.getMinutes()),
         seconds: padZero(date.getSeconds()),
         timeZone: "" // date.getTimezoneOffset()
      });
   }
   
   var renderButtons = function(enclosure, source) {
      var result = "";
      if (enclosure && enclosure.link) {
         result += render(data.image, {
            source: baseUri + "enclosure.gif",
            title: enclosure.type,
            link: encodeURI(enclosure.link),
            width: 13,
            height: 16
         });
      }
      if (source && source.link) {
         result += render(data.image, {
            source: baseUri + "source.gif",
            title: source.title,
            link: encodeURI(source.link),
            width: 15,
            height: 15
         });
      }
      return result;         
   }
   
   var param = data.param;
   var rss = data.rss = {items: []};
   var xml = getDocument(data.xml);

   rss.error = getError();
   if (rss.error !== null) {
      xml = getDocument(render(data.error, {
         link: baseUri + "?" + encodeXml(data.query),
         message: encodeXml(rss.error)
      }));
      param.compact = 0;
      param.showXmlButton = 1;
   }

   var root = xml.documentElement;
   var type = root.nodeName;

   if (type === "scriptingNews") {
      var channel = getNode(xml, "header");
      rss.format = "Scripting News";
      rss.version = getText(getNode(channel, "scriptingNewsVersion"));
      rss.title = getText(getNode(channel, "channelTitle"));
      rss.description = getText(getNode(channel, "channelDescription"));
      rss.link = getText(getNode(channel, "channelLink"));
      if (ref = getText(getNode(channel, "imageUrl"))) {
         ref = rss.image = {source: ref};
         ref.title = getText(getNode(channel, "imageTitle"));
         ref.link = getText(getNode(channel, "imageLink"));
         ref.width = getText(getNode(channel, "imageWidth"));
         ref.height = getText(getNode(channel, "imageHeight"));
         ref.description = getText(getNode(channel, "imageCaption"));
      }
   } else {
      var channel = getNode(xml, "channel");
      rss.format = "RSS";
      rss.version = (type === "rdf:RDF") ? "1.0" : 
            root.getAttribute("version");
      rss.title = getText(getNode(channel, "title"));
      rss.description = getText(getNode(channel, "description"));
      rss.link = getText(getNode(channel, "link"));
      var image = getNode(xml, "image");
      if (image) {
         ref = rss.image = {};
         ref.source = getText(getNode(image, "url"));
         ref.title = getText(getNode(image, "title"));
         ref.link = getText(getNode(image, "link"));
         ref.width = getText(getNode(image, "width"));
         ref.height = getText(getNode(image, "height"));
         ref.description = getText(getNode(image, "description"));
      }
   }
   
   if (type === "rdf:RDF") {
      rss.date = renderDate(getText(getNode(channel, "date", "dc")) || data.modified);
      rss.rights = getText(getNode(channel, "creator", "dc"));
      var input = getNode(root, "textinput");
      if (input && !getNode(input, "link")) {
         input = root.getElementsByTagName("textinput")[1];
      }
      if (input) {
         ref = rss.input = {};
         ref.link = getText(getNode(input, "link"));
         ref.description = getText(getNode(input, "description"));
         ref.name = getText(getNode(input, "name"));
         ref.title = getText(getNode(input, "title"));
      }
   } else {
      rss.date = renderDate(getText(getNode(channel, "lastBuildDate") || getText(getNode(channel, "pubDate"))) || data.modified);
      rss.rights = getText(getNode(channel, "copyright"));
   }
   
   var item, text, node;
   var items = xml.getElementsByTagName("item");

   for (var i=0; i<Math.min(items.length, param.maxItems); i+=1) {
      item = items[i];

      if (type === "scriptingNews") {
         ref = {title: ""};
         ref.description = getText(getNode(item, "text")).replace(/\n/g, " ");
         ref.link = getText(getNode(item, "link"));
         if (text = trim(getText(getNode(item, "linetext")).replace(/\n/g, " "))) {
            ref.description = ref.description.replace(new RegExp(text), 
                  '<a href="' + getText(getNode(item, "url")) + '">' + text + '</a>');
         }
      } else {
         ref = {
            title: getText(getNode(item, "title")),
            description: getText(getNode(item, "description")),
            link: getText(getNode(item, "link") || getNode(item, "guid"))
         };
     }

     if (node = getNode(item, "source")) {
        ref.source = {
           link: node.getAttribute("url"),
           title: getText(node)
        }
     }
     
     if (node = getNode(item, "enclosure")) {
        ref.enclosure = {
           link: node.getAttribute("url"),
           length: node.getAttribute("length"),
           type: node.getAttribute("type")
        }
     }
     
     if (node = getNode(item, "category")) {
        ref.category = {
           domain: node.getAttribute("domain") || "",
           content: getText(node)
        }
     }
     
     rss.items.push(ref);
   }
   
   var item, items = "";
   for (var i=0; i<rss.items.length; i+=1) {
      item = rss.items[i];
      items += render(data.item, {
         title: new function() {
            var title = (!param.compact ? "<strong>" : "");
            if (item.link) {
               title += render(data.link, {
                  link: encodeURI(item.link),
                  text: item.title,
                  'class': "rssBoxItemTitle"
               });
            } else {
               title += item.title;
            }
            !param.compact && (title += "</strong>");
            return new String(title); // FIXME: Funny, title alone will be rendered as [object]
         }(),
         'break': item.title && item.description ? "<br />" : "",
         description: (!param.compact || !item.title) && item.description,
         buttons: renderButtons(item.enclosure, item.source)
      });
   }
   
   var box = render(data.box, {
      title: rss.link ? render(data.link, {
         link: encodeURI(rss.link),
         text: rss.title,
         'class': "rssBoxTitle",
         style: "color: " + param.titleBarTextColor
      }) : rss.title,
      description: rss.description,
      items: items,

      xmlButton: param.showXmlButton && render(data.image, {
         link: param.url,
         source: baseUri + "rss.png",
         title: rss.format + " " + rss.version,
         width: 16,
         height: 16,
         align: "right",
         hspace: 3
      }),
      
      image: !param.compact && rss.image && render(data.image, {
         link: encodeURI(rss.image.link),
         source: rss.image.source,
         width: rss.image.width,
         height: rss.image.height,
         title: rss.image.title,
         align: "right",
         valign: "baseline",
         hspace: 5,
         vspace: 5
      }),
      
      input: !param.compact && rss.input && render(data.input, {
         link: encodeURI(rss.input.link),
         description: rss.input.description,
         name: rss.input.name,
         title: rss.input.title
      }),
      
      date: rss.date,
      width: param.width,
      frameColor: param.frameColor,
      fontFace: param.fontFace,
      align: param.align,
      titleBarColor: param.titleBarColor,
      titleBarTextColor: param.titleBarTextColor,
      boxFillColor: param.boxFillColor,
      textColor: param.textColor
   });

   if (!window.rssBoxSetup) {
      document.write(box);
   }
   
   return box;
};

org.p3k.RssBox();

