summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");