db4
Slava Pestov 2008-04-17 05:25:11 -05:00
parent 4235715af9
commit 53c8299576
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,5 @@
USING: rss io kernel io.files tools.test io.encodings.utf8 ;
USING: rss io kernel io.files tools.test io.encodings.utf8
calendar ;
IN: rss.tests
: load-news-file ( filename -- feed )
@ -35,7 +36,7 @@ IN: rss.tests
"http://example.org/2005/04/02/atom"
"\n <div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p><i>[Update: The Atom draft is finished.]</i></p>\n </div>\n "
"2003-12-13T08:29:29-04:00"
T{ timestamp f 2003 12 13 8 29 29 -4 }
}
}
} ] [ "extra/rss/atom.xml" resource-path load-news-file ] unit-test

View File

@ -7,9 +7,6 @@ USING: xml.utilities kernel assocs xml.generator
http.client namespaces xml.generator hashtables
calendar.format accessors continuations ;
: ?children>string ( tag/f -- string/f )
[ children>string ] [ f ] if* ;
: any-tag-named ( tag names -- tag-inside )
f -rot [ tag-named nip dup ] with find 2drop ;
@ -26,7 +23,7 @@ C: <entry> entry
[ "link" tag-named children>string ] keep
[ "description" tag-named children>string ] keep
f "date" "http://purl.org/dc/elements/1.1/" <name>
tag-named ?children>string rfc3339>timestamp
tag-named dup [ children>string rfc3339>timestamp ] when
<entry> ;
: rss1.0 ( xml -- feed )