Go ahead! Criticize my XML! :)
Posted: Mon Apr 22, 2002 5:39 am
Constructively, that is. 
I am working on an XML file format for Monthly Calendars. As is often the case with the technologies we use for web development, there are a few different ways to do things. For example, I might change the empty "date" elements from "<date></date>" to "<date/>" and I might even change them to the names of the days of the week; I have not yet decided.
Would anyone care to comment about any aspect of this file/file format? Have you learned anything of particular interest while working with something similar? Perhaps you are feeling a bit down and you would feel better after criticizing my DTD?
I am working on an XML file format for Monthly Calendars. As is often the case with the technologies we use for web development, there are a few different ways to do things. For example, I might change the empty "date" elements from "<date></date>" to "<date/>" and I might even change them to the names of the days of the week; I have not yet decided.
Would anyone care to comment about any aspect of this file/file format? Have you learned anything of particular interest while working with something similar? Perhaps you are feeling a bit down and you would feel better after criticizing my DTD?
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- This is just one idea for a single-month XML calendar file. -->
<!-- Hmm... should I call the root element "month", "calendar", or "monthly_calendar"? -->
<!-- If I call it "calendar" or "monthly_calendar", I can store the name of the month in a "month" element. -->
<!-- If I call it "month", I will need to store the name of the month in a "name" element. -->
<!-- I might want to use day names instead of seven "date" elements within "week" elements. -->
<!DOCTYPE monthly_calendar ї
<!ELEMENT monthly_calendar (month, year, week)>
<!ELEMENT month (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT week (date)>
<!ELEMENT date (#PCDATA)>
]>
<monthly_calendar>
<month>May</month>
<year>2002</year>
<week>
<date></date>
<date></date>
<date></date>
<date>1</date>
<date>2</date>
<date>3</date>
<date>4</date>
</week>
<week>
<date>5</date>
<date>6</date>
<date>7</date>
<date>8</date>
<date>9</date>
<date>10</date>
<date>11</date>
</week>
<week>
<date>12</date>
<date>13</date>
<date>14</date>
<date>15</date>
<date>16</date>
<date>17</date>
<date>18</date>
</week>
<week>
<date>19</date>
<date>20</date>
<date>21</date>
<date>22</date>
<date>23</date>
<date>24</date>
<date>25</date>
</week>
<week>
<date>26</date>
<date>27</date>
<date>28</date>
<date>29</date>
<date>30</date>
<date>31</date>
<date></date>
</week>
</monthly_calendar>