phatcactus
The Ugly Organist
I'm making my band a shiny new website, and I've decided to store its innards as XML instead of the weird custom markup I was using before. Parts of the site's data are based on dates, and I've come up with two possible ways to format it.
Way one...
...and way two...
The first one seems more semantically proper, as the year/month/day contains the event, instead of the event/date/(year,month,day). But the second one is a bit easier to work with.
I'm just wondering if there is some precedence dictating how something like this should be done. There's no difference to the viewer of the site, and nobody will ever see this stuff but me, but as long as I'm learning to do this, I'd like to learn the right (or at least best) way.
And I'm intensely anal. ::evil::
Way one...
Code:
<event_list>
<year n="2003">
<month n="10">
<day n="31">
<event>
<data>Yadda yadda!</data>
<time>20:00</time>
</event>
</day>
</month>
</year>
</event_list>
...and way two...
Code:
<event_list>
<event>
<date>
<year>2003</year>
<month>10</month>
<day>31</day>
<hour>20</hour>
<minute>00</minute>
</date>
<data>Yadda yadda!</data>
</event>
</event_list>
The first one seems more semantically proper, as the year/month/day contains the event, instead of the event/date/(year,month,day). But the second one is a bit easier to work with.
I'm just wondering if there is some precedence dictating how something like this should be done. There's no difference to the viewer of the site, and nobody will ever see this stuff but me, but as long as I'm learning to do this, I'd like to learn the right (or at least best) way.
And I'm intensely anal. ::evil::