From: Frank B. <fbergman@u.washington.edu> - 2010-05-18 02:30:27
|
Hello all, I know at the Hackathon we were briefly talking about ChangeXML, and that it should be included in SEDML Level 1 Version 1. So I finally had a detailed look at the construct and tried to map out what implications it would have. Currently we have one construct: <changeXML target="<xpath expression to model variable>" newXML="<some really long unvalidatable string here that might or might not be XML>" /> I assume this to be a typo. If I remember it correctly from our discussions this really should look like this: <changeXML target="<xpath expression to model variable>"> <newXML> <some new xml here, validatable with target namespace and bells and whistles> </newXML> </changeXML> Ok ... this basically would work ... so the next important thing to ask, is what would we like to do with this. Basically three things: - adding new elements (i.e.: a degradation reaction to an existing species) - replacing an element by something else (i.e.: a lumped reaction by its individual steps) - deleting elements (i.e.: removing a reaction step) Previously we discussed, that we could delete elements by replacing a target with an empty newXML block. If we look at the draft specification we find an example, that shows that we could add a parameter to a model, by replacing one parameter with itself and another one: 1 <model [..]> 2 <listOfChanges> 3 <changeXML target="/sbml:sbml/sbml:model/sbml:listOfParameters 4 /sbml:parameter[@id='V_mT ']" 5 newXML="<parameter metaid="metaid_0000010" id="V_mT" value="0.7"> 6 <parameter metaid="metaid_0000050" id="V_mT_2" value="4.6">" /> 7 </listOfChanges> 8 </model> I would very much prefer to keep the individual operations separate, either by introducing an additional attribute 'operation' on the changeXML element: 1 <model [..]> 2 <listOfChanges> 3 <changeXML target="/sbml:sbml/sbml:model/sbml:listOfParameters" 4 operation="add"> 5 <newXML> 6 <parameter xmlns="<sbmlnshere>" metaid="metaid_0000050" id="V_mT_2" value="4.6"> 7 </newXML> 8 </listOfChanges> 9 </model> The advantage here is that it is much easier to apply changes from one model to another, without artificially having to replace existing elements by itself + whatever one wants to add in the first place. Similarly: <changeXML target="/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='V_mT ']" operation="delete"/> would delete an element ... and so on ... alternatively if someone would really be against the additional attribute, we could introduce differently named elements like: <addXML target="<xpath>"><newXML> <stuff here/> </newXml> </addXML> <removeXML target="xpath"/> And changeXML would remain as is ... Let the floor be open for comments :) Cheers Frank |