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 |
From: Dagmar W. <dag...@un...> - 2010-05-28 06:50:57
|
Hej Frank, thanks for the recommendation. I cannot see any disadvantages with your suggestion, but I was wondering what the others think about it? Should we have an additional "operation" attribute on the changeXML element that will specify HOW we change the thingy addressed by the XPath expression? Fixed values suggested were "delete", "update" and "add". Any opinions? Dagmar Frank Bergmann wrote: > 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 > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > SED-ML-discuss mailing list > SED...@li... > https://lists.sourceforge.net/lists/listinfo/sed-ml-discuss > |
From: Richard A. <ra...@st...> - 2010-05-28 09:09:22
|
Hi Dagmar, Having spent some time playing around trying to implement some of these operations, I'm strongly in favour of Frank's suggestion as 1) An operation is made explicit to a single target XPath . Possibly we could have multiple model XML elements to add/remove in a single changeXML element if all the model XML elements were rooted in the same parent defined by XPath. E.g., suppose you want to add 2 parameter definitions to an SBML model. Rather than <addXML target="//sbml:sbml/sbml:model/sbml:listOfParameters"> <newXML> <parameter metaid=\"metaid_0000022\" id=\"beta22\" name=\"Ratio of protein to mRNA decay rates\" value=\"0.2\"/> </newXML> </addXML> <addXML target="//sbml:sbml/sbml:model/sbml:listOfParameters"> <newXML> <parameter metaid=\"metaid_0000233\" id=\"beta233\" name=\"Ratio of protein to mRNA decay rates\" value=\"0.4\"/> </newXML> </addXML> they could be combined. E.g., <addXML target="//sbml:sbml/sbml:model/sbml:listOfParameters"> <newXML> <parameter metaid=\"metaid_0000022\" id=\"beta22\" name=\"Ratio of protein to mRNA decay rates\" value=\"0.2\"/> <parameter metaid=\"metaid_0000233\" id=\"beta233\" name=\"Ratio of protein to mRNA decay rates\" value=\"0.4\"/> </newXML> </addXML> 2) I prefer Frank's second suggestion of subelements for XML operations rather than attributes - additional operations could be added in future without altering the base class changeXML. Cheers Richard > Hej Frank, > > thanks for the recommendation. > > I cannot see any disadvantages with your suggestion, > but I was wondering what the others think about it? > > Should we have an additional "operation" attribute on the changeXML > element that will specify HOW we change the thingy addressed by the > XPath expression? Fixed values suggested were "delete", "update" and "add". > > Any opinions? > Dagmar > > > > Frank Bergmann wrote: >> 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 >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> SED-ML-discuss mailing list >> SED...@li... >> https://lists.sourceforge.net/lists/listinfo/sed-ml-discuss >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > SED-ML-discuss mailing list > SED...@li... > https://lists.sourceforge.net/lists/listinfo/sed-ml-discuss > > -- Dr Richard Adams Software Development Team Leader, Centre For Systems Biology Edinburgh University of Edinburgh Tel: 0131 650 8285 email : ric...@ed... -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |