Re: SD3 - Data Types

Andrew Layman wrote:
> For example, if an element's contents are ANY or MIXED, an xml-type
> attribute might identify it as actually being a date, in a standard
> format such as ISO 8061. This separates the semantics (e.g. "Due Date")
> from its representation ("ISO 8061 date").

This is essentially SGML's NOTATION. 

There is a related issue that is, in my mind, more important (but should
wait until XML 2.0). Shouldn't there be a way for editors and parsers to
syntactically validate these constructs without looking up the semantics
or incorporating an IETF RFC or ISO spec? For database people, I'm
talking about the simple regular expressions that database front ends
use to restrict incoming data to phone numbers, dates, etc. For SGML
people I am talking about something like HyTime's Lextype (I think...).
Allowing these specifications would not complicate the implementation of
simple parsers or perl scripts, but it would (obviously) complicate the
implementation of validating parsers.

Questions about restricting element and attribute syntax are the most
common I get in teaching SGML and I never know what to say: "Well, SGML
isn't really about syntax, but rather about semantics." Huh? That's not
right!!!

 Paul Prescod

Received on Saturday, 17 May 1997 23:18:18 UTC