W3C home > Mailing lists > Public > public-microxml@w3.org > January 2013

RE: A really micro schema language

From: Liam R E Quin <liam@w3.org>
Date: Thu, 17 Jan 2013 14:27:20 -0500
To: David Lee <David.Lee@marklogic.com>
Cc: Michael Kay <mike@saxonica.com>, Brian Kardell <bkardell@gmail.com>, John Cowan <cowan@mercury.ccil.org>, James Clark <jjc@jclark.com>, "public-microxml@w3.org" <public-microxml@w3.org>
Message-ID: <1358450840.13751.11.camel@localhost.localdomain>
On Thu, 2013-01-17 at 16:59 +0000, David Lee wrote: 
> --------------
> Exchanging typed data makes sense to me.

+1

> Doing it by reducing all the data to text, and then sending the type
> information separately in another document, to be matched up with the
> serialized instance by means of a complex parsing process, doesn't
> make much sense at all.

-1  :-)

> If you want to send typed data, the type information should be
> embedded in the instance.

Sometimes there are good reasons for one approach over the other.
Out-of-band type (and cardinality) information can allow for greater
compression in transmission for example - see EXI.  I agree the parsing
process shouldn't be complex, of course.

During XML design at one point I argued for marking mixed content
elements and EMPTY elements, e.g. using @ and $ (this predated XPath),
  <$p>mixed content paragraph</$p>,
and had it been adopted a lot of XML pain would have avoided but some
other pain would have been enjoyed by all.

For type information a strength of XML in some environments is that you
can infer different types by applying different schemas.

All this depends on what you mean by "type" though. If you mean machine
type - octet, 18-bit signed twos complement integer, 36-bit
floating-point, you get a different answer to someone who means
user-defined type with user-defined constraints, sock size, hat size,
federal budget deficit, author name, CSS colour... and again different
from the SGML meaning of element type as evidenced in the name of the
element...

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
Received on Thursday, 17 January 2013 19:27:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 17 January 2013 19:27:30 GMT