Strong Typing in SGML and XML

Tim Bray tbray at textuality.com
Tue May 6 02:11:07 BST 1997


Ever since about 15 minutes after SGML was born, database people have been
discovering, to their surprise, that it contains no facilities for
strong data typing.  You can have an element named <BIRTH-DATE>, and
SGML will have no problem accepting 

<birth-date>purple bananas rule</birth-date>.

Whenever more than two people start talking about the future of SGML, 
someone starts complaining about typing.  With the advent of XML, the 
volume has increased.  As an old database guy, I've been one of the loud 
complainers.  

While we're really not ready for this on the WG, it is something that
we're going have to do something about before too long.  So I've posted
a modest proposal at:

    http://www.textuality.com/xml/typing.html

Overview points:

1. This only types elements, not attributes.  It's easier.
2. It's based on SQL types, not HyTime lextypes.  That's what the
   database world is used to.  This could probably be implemented
   using lextypes.
3. The syntax for dates and so on should match some ISO standard,
   but I haven't found which one yet.

Cheers, Tim Bray
tbray at textuality.com http://www.textuality.com/ +1-604-708-9592

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)




More information about the Xml-dev mailing list