[thelist] Address Book Markup Language - Address Books written in XML
Lachlan Cannon
luminosity at members.evolt.org
Mon Sep 2 22:03:01 CDT 2002
Simon Willison wrote:
> Looks like an interesting project. Here are a few thoughts:
>
> 1. How about allowing multiple comments for each contact? "comments*"
> instead of "comments?"
Can you give me an example of when you wouldn't want to put all your
comments under the one tag?
> 2. You use a huge amount of elements with #PCDATA which could be replaced
> with attributes. Remember, many XML parsers handle attributes faster than
> #PCDATA so using them can give a good overall performance gain. For
> example, birthdate(month, date, year) could be better handled with:
>
> <!ELEMENT birthdate (date)>
> <!ELEMENT anniversary (date)>
> <!ELEMENT date EMPTY>
> <!ATTLIST date
> month CDATA #REQUIRED
> day CDATA #REQUIRED
> year CDATA #REQUIRED
> >
>
> Alternatively you could have the month/day/year attributes as part of the
> birthdate/anniversary elements themselves - I'm not sure what is considered
> best practise for that kind of thing.
Hmm... to make it easier, I've changed it to multiple date elements
coming from the dates element, each with those three attributes, and a
type attribute to define what type of date it is. I think that works
around that problem well enough, and it makes it more easily extensible
for other types of dates.
> 3. businesses could do with having optional addresses information
I've put down a single optional address element in businesses. My
original thinking was that this would be covered by the work address
element, but I realised that you might need to have the companies head
office as well. I don't think that other addresses for the company would
be relevant though, since they wouldn't affect the person which the
address book listing is about. Thoughts?
Thanks,
--
Lach
__________________________________________
Web: http://illuminosity.net/
E-mail: lach @ illuminosity.net
MSN: luminosity @ members.evolt.org
__________________________________________
More information about the thelist
mailing list