[kepler-dev] Re: XMLToken and RecordToken

Edward A. Lee eal at eecs.berkeley.edu
Fri Dec 10 21:42:15 PST 2004

Apologies for the delay in responding to this...

I think that mapping XML to record types, while possible, is
not the best solution. The "type" of an XML document is its
probably best defined to be its schema.  The "type" of a
record representation of an XML document would
reflect the exact structure of the document.  I think this
would make the type system less useful than it could be
for XML data.

You are right that currently XMLToken is just barely a placeholder.
I think the right solution is to create the requisite extensions
to the type system to represent XML schema.  If this is done really
well, then an XSL definition of a conversion between schema could
be type checked...  But a more modest goal would be to have an
XMLToken that supported schema checking at run time and provided
efficient access to a DOM represetation of the XML data.

The full-blown XML type system is probably not
a simple thing to do. But it certainly sounds
like a good project to me...  I vaguely recall, some time ago, that
Bertram send around a pointer to some prior work in this direction...
Looking at the prior work would be a good place to start...


At 12:37 PM 12/7/2004 -0700, Jianting Zhang wrote:
>Dear Dr. Lee:
>My name is Jianting Zhang and I'm doing my post-doc with SEEK project at 
>UNM. My background is in database and I'm learning Ptlemey/Kepler.
>I noticed that there are XMLToken and RecordToken in Ptolemy. While I 
>understand the funtion of RecordType, it seems to me that XMLToken is 
>currently just a placeholder with little real functionality. Could you 
>elabarate a little bit about the design philosophy of XMLToken?
>I'm working on workflow of geospatial data processing in Kepler which 
>involves many interfacing issues with crrent GIS/Remote Sensing processing 
>software, which in turn invovles user defined complex data types. Also I'm 
>interested in making the processing distributed by using dynamic(stubless) 
>Web services. At present, it seems that XML/GML is a good solution to link 
>GIS/RS-Web Services-Ptolemy/Kepler. This is the reason I'm intestered in 
>XMLToken in Ptolemy.
>Since I didn't find desired functionality (accessing name/type/value pair 
>in an XML string and type checking) in XMLToken, I'm thinking maping DOM 
>hierchary to RecordType hierarchy, which is possible at least 
>conceptually. Alternatively, I can extend XMLToken. Would you comment 
>which way might be better?
>Best Regards

Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2718
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal

More information about the Kepler-dev mailing list