[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Toad-devel] File format for tournament information
From: |
Ben Finney |
Subject: |
Re: [Toad-devel] File format for tournament information |
Date: |
Wed, 2 Apr 2003 15:17:42 +1000 |
User-agent: |
Mutt/1.5.3i |
On 02-Apr-2003, Garner, Robin wrote:
> > Any objections to defining an XML format, so that the DTD holds the
> > format description?
>
> I'm not a subscriber to the point of view that XML is inherently good,
> so I'd need to be convinced of the benefits. >From what I've seen to
> date, XML makes files harder to read, harder to parse and much much
> larger. Yes, you can do cute things with XSLT, but if the file format
> is easily readable anyway ... But if you have specific benefits in
> mind, I'm open to persuasion !
I don't think XML is the hammer for all nails, but it certainly has a
lot going for it. How about:
- All languages in current use have got an XML parser library already
written and debugged.
- Define the DTD once, and any program can put that together with the
XML data and know whether it's valid, and what fields are which.
And:
> > - Pick, and stick to, a delimiter for the fields; you're using space
> > sometimes, comma sometimes.
>
> The comma delimiter is there because there is a 2-level list. The
> alternative would be to have grouping elements (parentheses for
> example) around the sub-group. I don't think there's an objective way
> to determine whether one approach is better than another.
- XML shines with defining hierarchical data :-)
I think XML is a good choice for defining a storage format for data that
is more complex than lines of text, and that you expect to be useful for
more than just a single user on a single program. Tournament ranking
data certainly qualifies for both.
> > - Use ISO date format
>
> Good idea. Do you have a definition handy ?
Info on the ISO 8601 Date And Time Representation standard:
<http://directory.google.com/Top/Science/Reference/Standards/Individual_Standards/ISO_8601/>
In short, though, the most common formats used for human-readable data
are:
CCYY-MM-DD for date only
HH:MM:SS for time only
CCYY-MM-DDTHH:MM:SS for date and time (literal 'T' character)
For your purposes, to represent a specific time range:
CCYY-MM-DD/CCYY-MM-DD for date range
HH:MM:SS/HH:MM:SS for time range within a single day
--
\ "It ain't so much the things we don't know that get us in |
`\ trouble. It's the things we know that ain't so." -- Artemus |
_o__) Ward (1834-67), U.S. journalist |
address@hidden F'print 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B