[
Lists Home |
Date Index |
Thread Index
]
Quoting hhalpin@ibiblio.org:
> Then, it
> seems at least as XML is concerned, is that those of us who think typing
> is useful (albeit a small minority on this list) would like to see some
> good, extensible type system (although no-one seems to have any good ideas
> on this list)
Typing is very useful. And people on the list do have ideas. Some even
have experience in such things.
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.
It doesn't take too much to see that storing a schema for an xml document
externally brings on the system some very extreme limitations. If two
parties need to access the schema for it to work... or the schema is
removed because it's obsolete.... ends up being a big problem... not
something you would want when you need to look up an invoice from
last month...
Anyway..
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.
For example, what we do in our company is break xml up as having
two types of components; tags and data-elements.
Tags are our famous and familiar XML tags. ie <Visiting>Hiya</Visiting>
Then everything else is data elements. With its data-type encoded
in the tag.
For example, <Information>
Company_Name&="Global Tradedesk Technology"
Registered?=True
Employees#=4
Date_Now@=20050105
Amount_Requested$=2000000
</Information>
The elements appear first, followed by the datatype, followed
by the data itself.
The legend is:
& = String type
? = logical type
# = Numeric type
@ = DateTime type
$ = Currency type (or local equiv)
That's what we do. It works well.
But everybody is having so much fun with XML 1.0 and 1.1 that
we don't want to move on? do we?
David Lyon
----------------------------------------------------------------
|