Lists Home |
Date Index |
- From: Michael.Kay@icl.com
- To: firstname.lastname@example.org
- Date: Fri, 15 Jan 1999 11:41:10 -0000
> >For all of these, we need architectures rather than markup languages
> >per se, because applications may need more than one name, date,
> >or money amount.
I've actually hit this in a recent project which is using all three of these
data types. I have to say I got myself a bit confused; in traditional data
modelling we distinguish between the property name (e.g. recipient) and the
domain (e.g. personalName), and I wasn't at all sure which of these to use
as the XML element name, especially when the element had sub-structure. I
guess architectural forms would have helped here, but they aren't mainstream
XML. I toyed with double nesting (e.g.
<recipient><personalName>Fred</personalName></recipient> but this seems
horribly clumsy. I also thought of using a fixed attribute
(dataType="personalName") in the DTD, but I don't particularly like fixed
attributes e.g. because they vanish when you use a non-validating parser.
In the end I just used the property name (<recipient>) and left the data
type as implicit, something the receiving application is expected to know.
Anyone have any better ideas?
PS: I decided not to tag the substructure of dates and currency in XML, so
currency appears just as GBP123.45, and dates as 1999-01-13. I tried XML
substructures at one stage but the troops rebelled.
Incidentally, I don't think "," as a decimal separator is any more
international than ".", unless you use "international" in the U.S. sense of
"not American". What you should really be using is a "middle dot"...
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)