Closed luciansmith closed 3 years ago
This is similar to #158. I think each language should be responsible for this. The SED-ML specs could simply link out to more information. We've started to collate this at BioSimulators.org.
We've set up NeuroML to use xpaths for changes and NeuroML URIs for xpaths for variables. Note, support for NeuroML is probably the most preliminary of all languages. This requires more discussion about a few issues with the NeuroML world. I'm trying to push that.
While the CellML examples use XPaths, I don't think any software can interpret them. I believe OpenCOR exports xpaths, but ignores them on import. OpenCOR doesn't handle changes. Returned data is identified by CellML URIs, rather than SED-ML ids or Xpaths. (The Biosimulators interface to OpenCOR does use Xpaths both for changes and variables.)
Type TargetType Type TargetType is used to identify elements of a model. This type is derived from type string, and it is up to the target modeling language to define what form makes sense to uniquely identify a particular element of that model. For XML-based languages, using an XPath is required when referencing the raw XML of the model, but other schemes may be used when referencing more abstract concepts implied by the model.
Type XPath Type XPath is derived from type TargetType and is used to identify nodes and attributes within an XML representation. XPath in SED-ML is an XPath version 1 expression which can be used to unambiguously identify an element or attribute in an XML file. The concept of XPath is described in Section 3.3. Note that XPath may be used by some model languages to imply more abstract concepts implied by the model, such as pointing to an XML element to mean ‘the current value of this element in the changed model state’.
For XML-based languages, using an XPath is required when referencing the raw XML of the model
This seems overly strict to me. I'm not sure NeuroML's use of SED-ML would pass this rule. I would say something more like "XML-based languages can choose to use XPaths reference raw XML elements of model." or "XPaths are recommended ... "
My intent with that line was to say you had to do this for the add/change/remove XML constructs. I'll reword to be more explicit.
In principle, add/remove/change could also be generalized beyond XML model languages. The reason I haven't pushed for this is that I'm not aware of any model language that has syntax that would work effectively with such constructs. Such syntax would have to be created.
Of the model languages we've applied SED-ML to, Smoldyn comes closer. Additional Smoldyn commands can simply be appended to the end of a simulation configuration. This could be used with a generalized add
construct. But, I'm not sure how helpful this would be.
I do think that it could be good to have more semantic 'add/change/remove' constructs for l2, but for now I'm comfortable restricting them to XML, since 'XML' is in the name of the class, after all.
Changed to:
"For XML-based languages, using an XPath is required when referencing the raw XML of the model in a ChangeXML, AddXML, or RemoveXML, but other schemes may be used when referencing more abstract concepts implied by the model."
This works for me
@jonrkarr mentioned that NeuroML might end up using non-XPath versions of 'target' for SetValue and DataGenerators. If this is possible, it should probably be described in the spec.
(Also, if we could switch to using that scheme for SBML and CellML, that sounds wonderful.)