RE: A really micro schema language

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 UTC