[kepler-dev] ptolemy text attribute question

Chad Berkley berkley at nceas.ucsb.edu
Mon Aug 22 13:18:54 PDT 2005


Hi,

I've been trying to figure out how to define an Attribute that allows 
the use of CDATA within the body of the <property> element.  For instance:

<property name="documentation" 
class="org.kepler.moml.DocumentationAttribute">
   This is some docs...
</property>

I don't see any current Attributes that will do this and upon looking at 
the MoMLParser code, it doesn't look like they can do this because the 
_handlePropertyElement() method is called before the charData() method 
gets called to handle the character data inside the element.  This seems 
to limit the xml author to only including text inside the "value" 
attribute of the element.  This would normally be fine, but I would like 
to include a lot of text.  Maybe hundreds of lines.  Putting the text 
into the "value" attribute doesn't lend itself to this very well.

So, my question is, am I missing something and if not, would anyone 
object to me modifying the MoMLParser to be able to accept CDATA in leiu 
of the "value" attribute in a property element?

thanks,
chad


More information about the Kepler-dev mailing list