summaryrefslogtreecommitdiffstats
path: root/org/madore
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-09-01 19:55:10 +0200
committerDavid A. Madore <david+git@madore.org>2011-09-01 19:55:10 +0200
commit729c9ccfb3da245b79d52f5ec2dc9f248537595a (patch)
tree41dd6c32200265bb9e2564ff302090973963e905 /org/madore
parent5073c443cb3b016ee0d8d9de3771a6c6a9edd34c (diff)
downloaddamlengine-729c9ccfb3da245b79d52f5ec2dc9f248537595a.tar.gz
damlengine-729c9ccfb3da245b79d52f5ec2dc9f248537595a.tar.bz2
damlengine-729c9ccfb3da245b79d52f5ec2dc9f248537595a.zip
Add some missing elements which were needed for RSS validation.
Diffstat (limited to 'org/madore')
-rw-r--r--org/madore/damlengine/WeblogRSS.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/org/madore/damlengine/WeblogRSS.java b/org/madore/damlengine/WeblogRSS.java
index 99afa96..5d918b8 100644
--- a/org/madore/damlengine/WeblogRSS.java
+++ b/org/madore/damlengine/WeblogRSS.java
@@ -23,6 +23,8 @@ public final class WeblogRSS {
public static void fullProcess(OutputStream out)
throws Exception {
+ final String weblogBaseURI = "http://www.madore.org/~david/weblog/";
+
final Connection conn = WeblogDatabaseConnection.getConnection();
final PreparedStatement selSt
@@ -57,13 +59,21 @@ public final class WeblogRSS {
Element channel = rssDoc.createElementNS(DamlEngine.RSS10_NS, "channel");
rssRoot.appendChild(channel);
rssRoot.appendChild(rssDoc.createTextNode("\n"));
- channel.setAttributeNS(DamlEngine.RDF_NS, "rdf:about", "http://www.madore.org/~david/weblog/");
+ channel.setAttributeNS(DamlEngine.RDF_NS, "rdf:about", weblogBaseURI);
channel.appendChild(rssDoc.createTextNode("\n"));
Element chanTitle = rssDoc.createElementNS(DamlEngine.RSS10_NS, "title");
channel.appendChild(chanTitle);
channel.appendChild(rssDoc.createTextNode("\n"));
chanTitle.appendChild(rssDoc.createTextNode("David Madore's WebLog"));
+ Element chanLink = rssDoc.createElementNS(DamlEngine.RSS10_NS, "link");
+ channel.appendChild(chanLink);
+ channel.appendChild(rssDoc.createTextNode("\n"));
+ chanLink.appendChild(rssDoc.createTextNode(weblogBaseURI));
+ Element chanDescription = rssDoc.createElementNS(DamlEngine.RSS10_NS, "description");
+ channel.appendChild(chanDescription);
+ channel.appendChild(rssDoc.createTextNode("\n"));
+ chanDescription.appendChild(rssDoc.createTextNode("David Madore's WebLog"));
Element syUpdatePeriod = rssDoc.createElementNS(DamlEngine.SYNDICATION_NS, "sy:updatePeriod");
channel.appendChild(syUpdatePeriod);
channel.appendChild(rssDoc.createTextNode("\n"));
@@ -99,9 +109,9 @@ public final class WeblogRSS {
String monthStr = matcher.group(2);
// String dayStr = matcher.group(3);
String numberStr = String.format("%04d",id);
- String aboutUri = "http://www.madore.org/~david/weblog/"
+ String aboutUri = weblogBaseURI
+ "#d." + date + "." + numberStr;
- String linkUri = "http://www.madore.org/~david/weblog/"
+ String linkUri = weblogBaseURI
+ yearStr + "-" + monthStr + ".html"
+ "#d." + date + "." + numberStr;
Element li = rssDoc.createElementNS(DamlEngine.RDF_NS, "rdf:li");