Closed bilalshaikh42 closed 2 years ago
You could read all files with extension .xml
and check whether the default namespace starts with the URIs for CellML.
import lxml.etree
etree = lxml.etree.parse(filename)
root = etree.getroot()
default_ns = root.nsmap.get(None, '')
is_cellml = default_ns.startswith('http://www.cellml.org/cellml/')
is_sedml = default_ns.startswith('http://sed-ml.org/sed-ml/')
Rather than fixing this here, PMR2/models.physiomeproject.org#23 encourages the Physiome team to handle this upstream.
For example https://models.physiomeproject.org/w/andre/SAN-ORd