X-Schema syntax

Paul Prescod paul at prescod.net
Mon Jun 28 00:32:56 BST 1999


Mark Birbeck wrote:
> 
> A reply to Paul Prescod's reply to me:
> 
> > > [XML definitions of schema are better than DTD ones because they
> > > allow you to use the same tools as the rest of the time.]
> > For programmers. But I asked about usability, not programmability. XML
> > instance syntax is certainly easier for programmers.
> 
> You might have moved the goalposts here. Aren't programmers entitled to
> usability? 

In programming languages and APIs: sure. In syntaxes? Not really. The
human readers and writers of a syntax should be the first market for its
usability. Otherwise s-expressions would be the only syntax we use for
anything.

> Also, I assumed that the students you referred to were
> programmers. Anyway, the question still remains, why is it better to
> learn two syntaxes (XML and DTD) than just one?

This is one of my favorite paradoxes. I can't count how many speeches and
tutorials I've seen that started along the lines of: "XML schemas are
great because they don't require you to learn a new syntax" and then
continued along the lines of: "Now let's spend an hour talking about the
syntax." A syntax is built on top of XML and still be a unique syntax that
must be learned. RDF has a very complex syntax despite the fact that it is
"just XML." 

The real question, then, is "why learn a non-XML syntax instead of an XML
one?" The answer is the same as for URIs, XSL match patterns, programming
languages and mathematical notations. We invent new syntaxes because they
can be easier to read and understand. Usually being compact and/or
familiar is an important part of that. So for instance, thousands of
people are familiar with URLs and file systems and can learn XPointers
based on that knowledge. Similarly, many people are familiar with regular
expression syntax and can thus learn content model syntax based on that
knowledge.

Although I am in favor of instance syntax in general I think that
recasting regular expressions as nested elements is a big mistake from a
usability point of view and a very small gain from an ease-of-parsing
point of view.
-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

Perhaps the war in Kosovo would get more press if it were directed by
George Lucas.

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/ and on CD-ROM/ISBN 981-02-3594-1
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