提交 573b1a86 authored 作者: Thomas Mueller's avatar Thomas Mueller

The newsfeeds are now Atom 1.0 standard compliant.

上级 2cd1e9aa
......@@ -9,7 +9,7 @@ CREATE TABLE CHANNEL(TITLE VARCHAR, LINK VARCHAR, DESC VARCHAR,
LANGUAGE VARCHAR, PUB TIMESTAMP, LAST TIMESTAMP, AUTHOR VARCHAR);
INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
'http://www.h2database.com', 'H2 Database Engine', 'en-us', NOW(), NOW(), 'Thomas Mueller');
'http://www.h2database.com/', 'H2 Database Engine', 'en-us', NOW(), NOW(), 'Thomas Mueller');
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
......@@ -379,19 +379,19 @@ FROM CHANNEL C, ITEM I
UNION
SELECT 'newsfeed-atom.xml' FILE,
XMLSTARTDOC() ||
XMLNODE('feed', XMLATTR('version', '0.3') || XMLATTR('xmlns', 'http://purl.org/atom/ns#') || XMLATTR('xml:lang', C.LANGUAGE),
XMLNODE('title', XMLATTR('type', 'text/plain') || XMLATTR('mode', 'escaped'), C.TITLE) ||
XMLNODE('feed', XMLATTR('xmlns', 'http://www.w3.org/2005/Atom') || XMLATTR('xml:lang', C.LANGUAGE),
XMLNODE('title', XMLATTR('type', 'text'), C.TITLE) ||
XMLNODE('id', NULL, XMLTEXT(C.LINK)) ||
XMLNODE('author', NULL, XMLNODE('name', NULL, C.AUTHOR)) ||
XMLNODE('link', XMLATTR('rel', 'alternate') || XMLATTR('type', 'text/html') || XMLATTR('href', C.LINK), NULL) ||
XMLNODE('modified', NULL, FORMATDATETIME(C.LAST, 'yyyy-MM-dd''T''HH:mm:ss.SSS', 'en', 'GMT')) ||
XMLNODE('link', XMLATTR('rel', 'self') || XMLATTR('href', 'http://www.h2database.com/html/newsfeed-atom.xml'), NULL) ||
XMLNODE('updated', NULL, FORMATDATETIME(C.LAST, 'yyyy-MM-dd''T''HH:mm:ss''Z''', 'en', 'GMT')) ||
GROUP_CONCAT(
XMLNODE('entry', NULL,
XMLNODE('title', XMLATTR('type', 'text/plain') || XMLATTR('mode', 'escaped'), I.TITLE) ||
XMLNODE('title', XMLATTR('type', 'text'), I.TITLE) ||
XMLNODE('link', XMLATTR('rel', 'alternate') || XMLATTR('type', 'text/html') || XMLATTR('href', C.LINK), NULL) ||
XMLNODE('id', NULL, XMLTEXT(C.LINK || '/' || I.ID)) ||
XMLNODE('issued', NULL, FORMATDATETIME(I.ISSUED, 'yyyy-MM-dd''T''HH:mm:ss.SSS', 'en', 'GMT')) ||
XMLNODE('modified', NULL, FORMATDATETIME(I.ISSUED, 'yyyy-MM-dd''T''HH:mm:ss.SSS', 'en', 'GMT')) ||
XMLNODE('content', XMLATTR('type', 'text/html') || XMLATTR('mode', 'escaped'), XMLCDATA(I.DESC))
XMLNODE('updated', NULL, FORMATDATETIME(I.ISSUED, 'yyyy-MM-dd''T''HH:mm:ss''Z''', 'en', 'GMT')) ||
XMLNODE('content', XMLATTR('type', 'html'), XMLCDATA(I.DESC))
)
ORDER BY I.ID DESC SEPARATOR '')
) CONTENT
......
......@@ -113,7 +113,7 @@ public class UploadBuild {
String content = rs.getString("content");
conn.close();
ftp.store("/httpdocs/automated/history.sql", new ByteArrayInputStream(buildSql.getBytes()));
ftp.store("/httpdocs/automated/newsfeed.xml", new ByteArrayInputStream(content.getBytes()));
ftp.store("/httpdocs/automated/news.xml", new ByteArrayInputStream(content.getBytes()));
ftp.store("/httpdocs/html/testOutput.html", new ByteArrayInputStream(testOutput.getBytes()));
ftp.store("/httpdocs/coverage/overview.html", new FileInputStream("coverage/overview.html"));
String jarFileName = "bin/h2-" + Constants.getVersion() + ".jar";
......
......@@ -12,19 +12,19 @@ INSERT INTO CHANNEL VALUES('H2 Database Automated Build' ,
'http://www.h2database.com/html/build.html#automated', 'H2 Database Automated Build', 'en-us', NOW(), NOW(), 'Thomas Mueller');
SELECT XMLSTARTDOC() ||
XMLNODE('feed', XMLATTR('version', '0.3') || XMLATTR('xmlns', 'http://purl.org/atom/ns#') || XMLATTR('xml:lang', C.LANGUAGE),
XMLNODE('title', XMLATTR('type', 'text/plain') || XMLATTR('mode', 'escaped'), C.TITLE) ||
XMLNODE('feed', XMLATTR('xmlns', 'http://www.w3.org/2005/Atom') || XMLATTR('xml:lang', C.LANGUAGE),
XMLNODE('title', XMLATTR('type', 'text'), C.TITLE) ||
XMLNODE('id', NULL, XMLTEXT(C.LINK)) ||
XMLNODE('author', NULL, XMLNODE('name', NULL, C.AUTHOR)) ||
XMLNODE('link', XMLATTR('rel', 'alternate') || XMLATTR('type', 'text/html') || XMLATTR('href', C.LINK), NULL) ||
XMLNODE('modified', NULL, FORMATDATETIME(C.LAST, 'yyyy-MM-dd''T''HH:mm:ss.SSS', 'en', 'GMT')) ||
XMLNODE('link', XMLATTR('rel', 'self') || XMLATTR('href', 'http://www.h2database.com/automated/news.xml'), NULL) ||
XMLNODE('updated', NULL, FORMATDATETIME(C.LAST, 'yyyy-MM-dd''T''HH:mm:ss''Z''', 'en', 'GMT')) ||
GROUP_CONCAT(
XMLNODE('entry', NULL,
XMLNODE('title', XMLATTR('type', 'text/plain') || XMLATTR('mode', 'escaped'), I.TITLE) ||
XMLNODE('title', XMLATTR('type', 'text'), I.TITLE) ||
XMLNODE('link', XMLATTR('rel', 'alternate') || XMLATTR('type', 'text/html') || XMLATTR('href', C.LINK), NULL) ||
XMLNODE('id', NULL, XMLTEXT(C.LINK || '/' || I.ID)) ||
XMLNODE('issued', NULL, FORMATDATETIME(I.ISSUED, 'yyyy-MM-dd''T''HH:mm:ss.SSS', 'en', 'GMT')) ||
XMLNODE('modified', NULL, FORMATDATETIME(I.ISSUED, 'yyyy-MM-dd''T''HH:mm:ss.SSS', 'en', 'GMT')) ||
XMLNODE('content', XMLATTR('type', 'text/html') || XMLATTR('mode', 'escaped'), XMLCDATA(I.DESC))
XMLNODE('updated', NULL, FORMATDATETIME(I.ISSUED, 'yyyy-MM-dd''T''HH:mm:ss''Z''', 'en', 'GMT')) ||
XMLNODE('content', XMLATTR('type', 'html'), XMLCDATA(I.DESC))
)
ORDER BY I.ID DESC SEPARATOR '')
) CONTENT
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论