#!/usr/local/bin/xcerpt --cgi %+ DOC COMMENT BEGIN % The Slashdot site is a popular news site % among Open Source and Unix people, featuring technical articles relevant to % this audience. % This Xcerpt program reformats the information contained in the RSS summary % of the site. %+ DOC COMMENT END goal { cons { out { resource { "stdout:", "xml" }, html [ head [ title [ "Heise Newsticker" ] ], body [ div [ i [ "This document is generated dynamically by ", a [ attributes { href {"http://cvs.wastl.net/XcerptData/rss/xcerpt/rule-RSS-Heise.xcerpt"} }, "rule-RSS-Heise.xcerpt"], " from the RSS use case."] ], var Channel ] ] } }, query { var Channel -> div {{ attributes {{ id { "channel" } }} }} } } rule { cons { div [ attributes { id { "channel" } }, h1 [ "Channel:", var Channel ], table [ all [ tr [ td [ var Title ], td [ a [ attributes { href { var Link } }, var Link ] ] ] ] ] ] }, query { in { # resource { "file:rss/heise.rdf", "xml" }, resource { "http://www.heise.de/newsticker/heise.rdf", "xml" }, RDF [[ channel [[ title [[ var Channel ]] ]], item [[ title [[ var Title ]], link [[ var Link ]] ]] ]] } } }