CellML Discussion List

Text archives Help


[cellml-discussion] CellML API: Should cellmlVersion be read-only.


Chronological Thread 
  • From: Andrew Miller <ak.miller AT auckland.ac.nz>
  • To: cellml-discussion AT cellml.org
  • Subject: [cellml-discussion] CellML API: Should cellmlVersion be read-only.
  • Date: Fri, 26 Aug 2005 18:23:17 +1200
  • List-archive: <http://www.cellml.org/pipermail/cellml-discussion>
  • List-id: "For those interested in contributing to the development of CellML." <cellml-discussion.cellml.org>

It seems to me that cellmlVersion should be read-only, for consistancy with
the
way that XML is generally used(for example, in the DOM).

In the DOM, once an element is created, the qualified name(namespace and local
name) are immutable. Hence, if you need to change the namespace of an element,
you need to create a new element, and copy all the the data from that element
into the new element, and then replace the old element with the new element.
This choice is quite deliberate, because elements can be inherited from, and
the type of the element depends upon its qualified name. If you could change
the namespace arbitrarily, you could be changing the type of a node just by
setting a variable(which is incompatible with both the design of many systems,
and is confusing for users).

However, to change the CellML version of an element, we do have to change the
namespace.

It seems, therefore, that we should not allow individual CellMLElements to
arbitrarily be changed from one CellML version to another(and if you are using
the DOM for our implementation, then the node in the DOM model will be
unexpectedly replaced).

Best regards
Andrew Miller


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



  • [cellml-discussion] CellML API: Should cellmlVersion be read-only., Andrew Miller, 08/26/2005

Archive powered by MHonArc 2.6.18.

Top of page