Menu

#18 XPath expressions very unspecific

1.0
pending
nobody
None
2016-03-24
2016-03-16
No

Currently the xpath expressions to select elements are very unspecific in phrasedml.
They are all of the form:

target="/sbml:sbml/sbml:model/descendant::*[@id='S1']

Like this one does not know if it is a species, parameter, rule, .... just looking at the xpath string.
It requires parsing the SBML and using xpath to find which targets are meant.
With a full xpath expression to the target one only has to parse the xpath string to resolve the targets, i.e.

target="/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='S1']"
target="/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='S1']"

This is not a bug (the xpath is valid and resolves to a single target), but an improvement for readability and understandability of the generated SEDML.

See also
https://github.com/sys-bio/tellurium/issues/114

Not required to fix, but I am pretty sure many tools will have problems sbml:model/descendant::*[@id='S1']

Discussion

  • Matthias König

    Matthias König - 2016-03-23

    This can be changed to won't fix. I can handle this via tellurium.

    Unfortunately, despite being correct I am completely sure that this will create issues with every tool we will try to do roundtrips with. But will file issues with the respective tools than.

     
  • Lucian Smith

    Lucian Smith - 2016-03-23
    • status: open --> pending
     
  • Lucian Smith

    Lucian Smith - 2016-03-23

    I went ahead and looked into making this more specific, and discovered that in most cases, you should be able to do this relatively straightforwardly. There will be edge cases that don't work (i.e. models with package information), but most of the time, it'll be fine.

     
  • Matthias König

    Matthias König - 2016-03-24

    Perfect.
    This works great and solves lots of issues in tellurium & with round trips. All examples working in tellurium.
    The edge cases should work most of the time in tellurium (only if unclear if species concentration there could be an issue. But this will be solved with the full xpath support in tellurium).
    Can be closed.

     

Log in to post a comment.