[kepler-users] Workflow XML validator using JDOM

Chad Berkley berkley at nceas.ucsb.edu
Tue Jan 12 11:25:51 PST 2010


Hi Josep,

I'll let Christopher Brooks explain why it's not in the DTD (the ptolemy 
project controls the MoML DTD).  I can tell you that the <svg> element 
is used to set SVG icons in ptolemy.  This attribute is not used (to my 
knowledge) in kepler since we have our own icon set.

chad


Josep Morer Muñoz wrote:
> Hi all,
> 
> I have build a XML validator using JDOM. I am trying to validate Kepler 
> workflows using DTD file 
> (http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd) but in most of 
> cases the validator fails when the workflow has parameters, for example 
> 02-LoktaVolterraPrey.xml in getting-started directory. The validator 
> fails because finds an unknown tag in XML file named *svg*.
> 
> For example:
> 
> <entity name="02-LotkaVolterraPredatorPrey" 
> class="ptolemy.actor.TypedCompositeActor">
>     <property name="_createdBy" 
> class="ptolemy.kernel.attributes.VersionAttribute" value="7.0.2">
>     </property>
>     <property name="r" class="ptolemy.data.expr.Parameter" value="2">
>         <property name="_hideName" 
> class="ptolemy.kernel.util.SingletonAttribute">
>         </property>
>         <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
>         </property>
>         <property name="_smallIconDescription" 
> class="ptolemy.kernel.util.SingletonConfigurableAttribute">
>             <configure>
>       <svg>
>         <text x="20" style="font-size:14; font-family:SansSerif; 
> fill:blue" y="20">-P-</text>
>       </svg>
>     </configure>
>         </property>
>         <property name="_editorFactory" 
> class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
>         </property>
>         <property name="_location" class="ptolemy.kernel.util.Location" 
> value="410.0, 50.0">
>         </property>
>     </property>
>     <property name="a" class="ptolemy.data.expr.Parameter" value="0.1">
>         <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
>         </property>
>         <property name="_smallIconDescription" 
> class="ptolemy.kernel.util.SingletonConfigurableAttribute">
>             <configure>
>       <svg>
>         <text x="20" style="font-size:14; font-family:SansSerif; 
> fill:blue" y="20">-P-</text>
>       </svg>
> ...
> 
> This element (red highlighted) is not defined in DTD file. Can it be 
> avoided? What does this tag mean?
> 
> Thanks for your help.
> -- 
> Josep
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users



More information about the Kepler-users mailing list