Names, Dates, Etc.

Simon St.Laurent simonstl at simonstl.com
Wed Jan 13 20:08:10 GMT 1999


At 02:35 PM 1/13/99 -0500, John Cowan 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.

Applications will indeed need more than one name, date, or money amount -
but will they need the information in multiple formats within the same
document?  Or would they rather get all names in a NameML format, all dates
in a DateML format, and all currency in a CurrencyML format?  Implementing
these as architectures is fine with me, if you want to spare the odd
element - but seeing them formally defined is most important.  

(And since XSL doesn't seem to support architectural forms, explaining the
architectural approach itself to newcomers will be fun.)

>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.

This is possible, certainly - I'd like to see something more formal, more
thoroughly XML.  Dates at least may be covered as a data type by a schema
of some sort, which could then point to that NOTE without much difficulty.

>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.

I spend a lot of time in my books apologizing about name formatting - first
name and surname don't make sense in too many contexts.  Family Name
usually means something, unless you're in Iceland, and even there it's a
mix.  I'd really like to see something hammered out more formally.

>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).

This sounds promising - I could probably even learn to pronounce , as point
given some practice - but again, we need to get this made some kind of
standard that people can find and use.

These seem like issues outside of the W3C's oversight - maybe they belong
at ISO, or maybe someone else should take a look.  Maybe the W3C's i18n
folks could look at it.

Leaving this information to chance seems like a good way to create enormous
frustration in the long run, reducing the touted 'lowered costs' of XML as
more and more incompatible formats describing similar things arise.

Simon St.Laurent
XML: A Primer / Cookies
Sharing Bandwidth 
Building XML Applications (March)
http://www.simonstl.com

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