#!/usr/local/bin/xcerpt --cgi %+ DOC COMMENT BEGIN % This Xcerpt program reformats the information contained in the RSS summary % of "Dagens Nyheter", a popular Swedish daily newspaper. %+ DOC COMMENT END GOAL out { resource { "stdout:", "xml" }, html [ head [ title [ "Dagens Nyheter: De Viktigaste Nyheter" ] ], body [ div [ i [ "This document is generated dynamically by ", a [ attributes { href {"http://cvs.wastl.net/XcerptData/rss/xcerpt/rule-RSS-DN.xcerpt"} }, "rule-RSS-DN.xcerpt"], " from the RSS use case."] ], var Channel ] ] } FROM var Channel -> div {{ attributes {{ id { "channel" } }} }} END CONSTRUCT div [ attributes { id { "channel" } }, h1 [ "Channel:", var Channel ], table [ all [ tr [ attributes { style { "background-color: lightblue"} }, td [ attributes { style { "font-weight:bold; font-family: Arial,Helvetica"} }, var Title ] ], tr [ td [ var Description, br {}, a [ attributes { href { var Link } }, "Läs mer ..."] ] ] ] ] ] FROM in { resource { "http://www.dn.se/DNet/jsp/polopoly.jsp?d=1399", "xml" }, rss [[ channel [[ title [[ var Channel ]], item [[ title [[ var Title ]], link [[ var Link ]], description [[ var Description ]] ]] ]] ]] } END