OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: Names, Dates, Etc.

[ Lists Home | Date Index | Thread Index ]
  • From: Michael.Kay@icl.com
  • To: xml-dev@ic.ac.uk
  • 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?

Mike Kay

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:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS