CellML Discussion List

Text archives Help


[cellml-discussion] Proposed amendment to CellML API: createMathElement


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-discussion] Proposed amendment to CellML API: createMathElement
  • Date: Fri, 07 Apr 2006 14:10:20 +1200

Hi all,

The CellML API currently provides a mechanism to offer MathML elements(which
extend from the DOM), but there is currently no generally applicable way to
actually create a <math> element(in a pure DOM based view, you could do it
simply by getting the dom::Document, and asking it to create the element, but
since the CellML API doesn't extend from the DOM, you cannot always get the
dom::Document). The same problem will occur for extension elements.

There are two approaches we could use.
1) Expose extra methods to allow it, by appending the following to the
cellml_api::Model interface...

/**
* Creates a new MathMLMathElement...
* @return The new MathML math element.
*/
mathml_dom::MathMLMathElement createMathElement();

/**
* Creates a new extension element...
* @param namespaceURI The new namespace URI.
* @param qualifiedName The new (optionally) qualified name.
*/
dom::Element createExtensionElement(in dom::DOMString namespaceURI,
in dom::DOMString qualifiedName);
2) Provide a way to get hold of the dom::Document, for example, a new
attribute
on cellml_api::Model for that purpose.

I prefer option 1, as it seems cleaner.

Opinions?

Best regards,
Andrew Miller


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




Archive powered by MHonArc 2.6.18.

Top of page