[kepler-dev] XMLToken and RecordToken

Christopher Brooks cxh at eecs.berkeley.edu
Wed Dec 8 09:37:34 PST 2004

XMLToken was implemented by Yang Zhao, cc'd here.  She might
be able to elaborate on the design philosophy.  

XMLToken is used in actor/lib/xslt/XSLTransformer.java
and actor/lib/conversions/StringToXML.java

The advantage of using XMLToken over using a more generic token is
that when the generic token is extended, we get type safety and we can
have more specific parsing and processing in the extended token (in
this case, XMLToken).
Often, we end up developing code that uses a fairly generic token such
as ObjectToken or RecordToken and then later creating a specialized
token that has special operations.

I don't have a strong opinion, but probably the best thing to do would
be to add functionality to XMToken over using RecordToken so as to
have type safety.  However, I might be unclear on your plans, when 
you say "extend XMLToken", I'm not sure if you mean adding
functionality to XMLToken or subclassing XMLToken.



    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 i
    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 
    Best Regards
    kepler-dev mailing list
    kepler-dev at ecoinformatics.org

More information about the Kepler-dev mailing list