Closed luciansmith closed 3 years ago
This is important to enable small changes to models iiib other languages.
A while back target was changed to be a resolvable address (often unique) -- often XPath for XML based languages. This applies both to targets of changes and of variables.
Note, Xpaths shouldn't be required, even for XML languages. For example, LEMS/NeuroMl wants to go a different route. (SBML could too, but Xpaths are already engrained.)
When targets aren't xpaths, their syntax and semantics need to be governed by the associated model language. I think each language can manage this themself. The specifications could simply link out to information for specific languages. We've started to compile this at biosimulators.org/conventions.
Added to ChangeAttribute:
Despite its name, the ‘attribute’ changed by this class need not be an XML attribute, and hence, its target need not be an XPath. Every target model language may define what ‘attributes’ may be changed by this contruct, and how to indicate those attributes.
Also removed claims that ChangeAttribute only applied to XML-based languages.
I'm still pretty iffy about this, but if some model languages want to go this way, I guess that's OK?
I think this is good.
I think SED-ML should let model languages handle targets and their new values however they like. Having surveyed multiple languages, no language actually uses XPaths internally. The use of XPaths by SED-ML complicates the processing of XML.
That said, I think XPath is much more reasonable for AddXML, RemoveXML, ChangeXML because model languages don't have provide a way to express something similar. AddXML, RemoveXML, ChangeXML are awkward ways of describing changes, but they fill a void.
I'm still wary about using SED-ML with non-xml languages. Using changes entirely based on XML manipulations made it really easy to implement it only once and reuse. Using it for non-XML languages without specifying how the transformations are to take place seems questionable, and we definitely need to revisit this in L2.
For L1V4, since we have gone that route, i'm fine with the formulation.
I am good with the changes.
@jonrkarr mentioned that the 'changeAttribute' class is being used for non-XML languages. This surprised me, as the 'attribute' in the class name is expressly connected to an XML attribute, and I assumed that this meant that 'changeAttribute' was like 'removeXML' and simply couldn't be used for non-XML languages.
If this isn't the case, and there's some way to use changeAttribute, we need to clarify how that works.