> -----Original Message-----
> From: owner-visad@xxxxxxxxxxxxxxxx
> [mailto:owner-visad@xxxxxxxxxxxxxxxx]On Behalf Of Armin S. A. Roehrl
> Sent: Friday, December 10, 1999 4:44 AM
> To: Bill Hibbard
> Cc: visad
> Subject: Re: XML and VisAD.
>
>
> Hello, I'm far from an XML expert, but I believe in XML for data
> interchange.
> and use it in one other project.
> >
> > No one I know of is currently working on an XML adapter for
> > VisAD, but it would be a good thing. Ideally it would be an
> > extension of visad.data.Form and reside in the visad.data.xml
> > package. It would require some decisions about how XML fields
> > get mapped to the VisAD data model. Certainly a table full of
> > records with named fields could be mapped to a FunctionType
> > like:
> >
> > (index -> (field1, field2, ..., fieldN))
> >
> > where 'index' is just an ordinal record number in the table,
> > and the fields may be either numerical or text. You could
> > also do nested tables as nested FunctionTypes.
>
> > I don't know enough about XML to know if it defines standard
> > fields for units, coordinate systems, topologies, missing
> > values, etc.
>
> You can define any units, coordinate systems, etc. in DTDs --
> it doesn't
> support anyuthing like that by default.
> The problem is that XML on purpose doesn't do anything like
> type-checking.
> i.e. you can't say that a field in a DTD must be a positive integer.
>
> >
> > If you or anyone wants to do any of this, we will be supportive
> > and also interested in helping to make your work available to
> > the VisAD community, by web links or inclusion of source with
> > our distribution.
> Right now, I have really tight constraints, but if s.b. else helps,
> I'd try my best to help.
>
> We would have to do two things:
> -think about the DTDs we're interested in to give meaningful
> describtion.
> -finally do the coding, but that is the easier part, as
> really good XML
> parsers
> exist.
>
> Thanks
> Armin
>
My 2 cents:
I agree that coding and parsing the XML is the easy part.
The hard part is to create good, reusable data abstractions. Hard
because you have to say what the semantics of the data are. We all
"know" what a "coordinate system" or a "unit" is, right? But when you
create instantiations of that understanding in software, you may
discover that that you are looking at the left ear of the elephant, and
someone else is looking at the tail.
On the other hand, if you want to use XML as a persistent form of the
_VisAD_ data model, thats a lot easier.
BTW, theres an accepted proposal to provide XML <-> Java class
compilation
"The proposed specification will define an XML data-binding facility
for the JavaTM Platform. Such a facility compiles an XML schema into one
or more Java classes. These automatically-generated classes handle the
translation between XML documents that follow the schema and
interrelated instances of the derived classes. They also ensure that the
constraints expressed in the schema are maintained as instances of the
classes are manipulated."
http://java.sun.com/aboutJava/communityprocess/jsr/jsr_031_xmld.html