[
Lists Home |
Date Index |
Thread Index
]
On Wed, 5 Jan 2005 19:46:53 +1100, david.lyon@computergrid.net
> The fact is that in most medium sized enterprises, XML gets overlooked
> largely for the reason that it's data type support is sub-standard for
> any serious business use.
I've heard lots of reasons that enterprises won't use XML -- many of
them valid -- but I've never heard this one. Do enterprise decision
makers even know about, much less base decisions on low-level criteria
like typing?
> The solution for us, is to put the typing information into the
> xml document itself and do away with an xml schema. Self describing
> and self contained XML.
I agree with this point. Most XML projects don't need data typing at
all, because the processing applications already know what they're
dealing with (and they make assumptions that go far beyond simple data
typing); for the projects that do need runtime typing information, it
shouldn't depend on any kind of external schema. I've always liked
the idea of an xml:type attribute, similar to xml:lang:
<entry>
<quantity xml:type="http://www.w3.org/2001/XMLSchema#int">5</entry>
<date xml:type="http://www.w3.org/2001/XMLSchema#date">2004-12-31</date>
</entry>
or, if you can tolerate Namespace prefixes in attribute values,
<entry xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<quantity xml:type="xsd:int">5</entry>
<date xml:type="xsd:date">2004-12-31</date>
</entry>
All the best,
David
--
http://www.megginson.com/
|