[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

extending RSS with namespace


extending rss
Hi,

After unsuccessfully looking for an XML based feed to retrieve
baseball standings to be used at one of our websites I finally decided
maybe writing our own feed would be a simpler matter.

RSS seemed the obvious choice since it was the most widely used format.

Thanks to Dave Winer for suggesting that I start with an XML namespace
module to extend the RSS format.
So far this is what I have come up with.


Any feedback and suggestions will be greatly appreciated.
Sample script:

<rss version="2.0"
     xmlns="http://backend.userland.com/rss2"
     xmlns:baseball="http://fantasy-baseball.org/baseball/">
<channel>
    <title>Baseball standings</title>
    <link></link>
    <description></description>
    <item>
        <title>National Leagues East Standings</title>
        <link>http://fantasy-baseball.org/standing/"</link>
        <description></description>
        <baseball:team>
            <baseball:city>Atlanta</baseball:city>
            <baseball:name>Braves</baseball:name>
            <baseball:win>45</baseball:win>
            <baseball:loss>21</baseball:loss>
            <baseball:percentage>.682</baseball:percentage>
            <baseball:gamesbehind>-</baseball:gamesbehind>
            <baseball:home>24-9</baseball:home>
            <baseball:road>21-12</baseball:road>
            <baseball:last10>8-2</baseball:last10>
            <baseball:streak>W1</baseball:streak>
        </baseball:team>
        <baseball:team>
            <baseball:city>Montreal</baseball:city>
            <baseball:name>Expos</baseball:name>
            <baseball:win>39</baseball:win>
            <baseball:loss>29</baseball:loss>
            <baseball:percentage>.574</baseball:percentage>
            <baseball:gamesbehind>7.0</baseball:gamesbehind>
            <baseball:home>23-11</baseball:home>
            <baseball:road>16-18</baseball:road>
            <baseball:last10>6-4</baseball:last10>
            <baseball:streak>L3</baseball:streak>
        </baseball:team>
        <baseball:team>
            <baseball:city>Philadelphia</baseball:city>
            <baseball:name>Phillies</baseball:name>
            <baseball:win>35</baseball:win>
            <baseball:loss>32</baseball:loss>
            <baseball:percentage>.522</baseball:percentage>
            <baseball:gamesbehind>10.5</baseball:gamesbehind>
            <baseball:home>18-15</baseball:home>
            <baseball:road>16-17</baseball:road>
            <baseball:last10>4-6</baseball:last10>
            <baseball:streak>W1</baseball:streak>
        </baseball:team>
        <baseball:team>
            <baseball:city>Florida</baseball:city>
            <baseball:name>Marlins</baseball:name>
            <baseball:win>32</baseball:win>
            <baseball:loss>37</baseball:loss>
            <baseball:percentage>.464</baseball:percentage>
            <baseball:gamesbehind>14.5</baseball:gamesbehind>
            <baseball:home>18-16</baseball:home>
            <baseball:road>14-21</baseball:road>
            <baseball:last10>5-5</baseball:last10>
            <baseball:streak>L1</baseball:streak>
        </baseball:team>
        <baseball:team>
            <baseball:city>New York</baseball:city>
            <baseball:name>Mets</baseball:name>
            <baseball:win>30</baseball:win>
            <baseball:loss>36</baseball:loss>
            <baseball:percentage>.455</baseball:percentage>
            <baseball:gamesbehind>15.0</baseball:gamesbehind>
            <baseball:home>16-16</baseball:home>
            <baseball:road>14-20</baseball:road>
            <baseball:last10>4-6</baseball:last10>
            <baseball:streak>L1</baseball:streak>
        </baseball:team>
    </item>
</channel>
</rss>

Looking at having the feed sourced at www.fantasy-baseball.org
and then 'testing' it at www.webhostingmontreal.com to act as a client
and display the feed.

- Lou
Louai Munajim
Architecture and Development
www.bambookit.com


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.