RSS Complex Example

This is a more complex example where the site builder has set all the relevant properties on the macro.

Note that the extraheaders parameter is the easier to use when used inside a parameter element rather than in an attribute. Furthermore, the RSS macro generates a compliant RSS feed by default. The <website></website> element that is added in this example makes the RSS feed invalid according to the standard though most RSS feed readers will accept the feed and some might even display the extra headers you supply.

 

Smartsite SXML CopyCode image Copy Code
<se:rss
    parent="287"
    title="This is my RSS feed."
     description="This is the RSS feed that gives you a daily update on my favorite news items in Dutch."
    language="nl-nl"
    link="http://www.nieuws.nl/smartsite.net?id=RSS"
    linkchannel="DEF"
    generator="Generated by me"
    copyright="(c) 2008"
    maxrows="15"
>
    <se:parameters>
        <se:parameter name="extraheaders">
            <website>http://www.mypersonalsite.com</website>
        </se:parameter>
    </se:parameters>
</se:rss>
Example Result CopyCode image Copy Code
<rss version="2.0">
    <channel>
        <title>This is my RSS feed.</title>
        <description>This is the RSS feed that gives you a daily update on my favorite news items in Dutch.</description>
        <language>nl-nl</language>
        <link>http://www.nieuws.nl/smartsite.net?id=RSS</link>
        <copyright>(c) 2008</copyright>
        <generator>Generated by me</generator>
        <website>http://www.mypersonalsite.com</website>
        <item>
            <title>Overig nieuws</title>
            <link>http://localhost/NL/Site_Root/Gisteren_nl/Nieuws/Overig_nieuws.html</link>
            <author>erijss@smartsite.nl (Erwin Rijss (Smartsite BV))</author>
            <pubDate>Fri, 21 Jul 2006 16:38:04 GMT</pubDate>
            <description>Als het nieuws dat niet in de categoriën Binnenlands, Buitenlands en Sport valt</description>
            <guid isPermaLink="false">NWS_20060721163704</guid>
        </item>
        <item>
            <title>Sport nieuws</title>
            <link>http://localhost/NL/Site_Root/Gisteren_nl/Nieuws/Sport_nieuws.html</link>
            <author>erijss@smartsite.nl (Erwin Rijss (Smartsite BV))</author>
            <pubDate>Fri, 21 Jul 2006 13:34:30 GMT</pubDate>
            <description>Het laatste actuele sport nieuws</description>
            <guid isPermaLink="false">NWS_20060721133406</guid>
        </item>
        <item>
            <title>Buitenlands nieuws</title>
            <link>http://localhost/NL/Site_Root/Gisteren_nl/Nieuws/Buitenlands_nieuws.html</link>
            <author>erijss@smartsite.nl (Erwin Rijss (Smartsite BV))</author>
            <pubDate>Fri, 21 Jul 2006 12:37:49 GMT</pubDate>
            <description>Een overzicht van het buitenlandse nieuws</description>
            <guid isPermaLink="false">NWS_20060721123652</guid>
        </item>
    </channel>
</rss>