- From: matt.halstead at auckland.ac.nz (Matt Halstead)
- Subject: [cellml-discussion] Proposed amendment to CellML API: createMathElement
- Date: Fri, 7 Apr 2006 20:17:42 +1200
+1 option 1.
On 7/04/2006, at 2:10 PM, Andrew Miller wrote:
>
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.
>
_______________________________________________
>
cellml-discussion mailing list
>
cellml-discussion at cellml.org
>
http://www.cellml.org/mailman/listinfo/cellml-discussion
Archive powered by MHonArc 2.6.18.