Names, Dates, Etc.
John Cowan
cowan at locke.ccil.org
Wed Jan 13 19:36:19 GMT 1999
Simon St.Laurent wrote:
> [I]s there any similar movement for NameML, DateML,
> or CurrencyML? Or are we going to be stuck with 50 different formats for
> each of those?
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.
The format of dates is nicely specified by a profile of ISO 8601,
http://www.w3.org/TR/NOTE-datetime-970915.html , which is a W3 Note.
So one convention would be to make any element that has a
"date" attribute with that value (or some simpler one preferably)
has mixed content in that format. Similar tricks can be played
with the other two cases.
As for the actual content, a name element should have the name
as its content, and a "surname" attribute to indicate the thing
to sort on, search for, e.g.
<recipient surname="stlaurent">Simon St. Laurent</recipient>
This is the most culturally neutral form. The term "surname" comes
from X.500 Person, and is admitted to be a bit misleading.
Bits about last name, first name, etc. are very culture specific.
For currencies there are two items(*), the 3-letter ISO 4217 currency
code (see http://www.indigo.ie/egt/standards/iso4217-en.html)
and the amount expressed as a decimal fraction (with the
international decimal point ",", please, not the North American
full stop).
I would recommend the currency code as an attribute
and the value as element content, but there is a case to be made
for representing them both as attributes and a properly formatted
version (like "$32.45" for USD or "32$45" for PTE or
"\u20AC32.45" for XEU).
(*) Now that "data" is a mass noun, we need a new plural for
"datum". One datum, two datums? Bletch.
--
John Cowan http://www.ccil.org/~cowan cowan at ccil.org
You tollerday donsk? N. You tolkatiff scowegian? Nn.
You spigotty anglease? Nnn. You phonio saxo? Nnnn.
Clear all so! 'Tis a Jute.... (Finnegans Wake 16.5)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list