Package org.w3c.dom.mathml
Interface MathMLContentToken
- All Superinterfaces:
Element,MathMLContentElement,MathMLElement,Node
- All Known Subinterfaces:
MathMLCiElement,MathMLCnElement,MathMLCsymbolElement
This is the interface from which the interfaces representing the MathML
Content token elements (ci, cn and csymbol) are derived. These elements may
contain MathML Presentation elements, Text nodes, or a combination of both.
Thus the getArgument and insertArgument methods have been provided to deal
with this distinction between these elements and other MathML Content
elements.
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteArgument(int index) A convenience method to delete the argument child located at the position referenced by index.getArgument(int index) A convenience method to retrieve the child argument at the position referenced by index.The arguments of this element, returned as a MathMLNodeList.A URI pointing to a semantic definition for this content element.A string describing the syntax in which the definition located at definitionURL is given.insertArgument(Node newArgument, int index) A convenience method to insert newArgument before the current index-th argument child of this element.removeArgument(int index) A convenience method to delete the argument child located at the position referenced by index, and to return it to the caller.setArgument(Node newArgument, int index) A convenience method to set an argument child at the position referenced by index.voidsetDefinitionURL(String definitionURL) setter for the definitionURL attribute.voidsetEncoding(String encoding) setter for the encoding attribute.Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface org.w3c.dom.mathml.MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXrefMethods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Method Details
-
getArguments
MathMLNodeList getArguments()The arguments of this element, returned as a MathMLNodeList. Note that this is not necessarily the same as Node::childNodes, particularly in the case of the cn element. The reason is that the sep elements that are used to separate the arguments of a cn are not returned.- Returns:
- value of the arguments attribute.
-
getDefinitionURL
String getDefinitionURL()A URI pointing to a semantic definition for this content element. Note that there is no stipulation about the form this definition may take!- Returns:
- value of the definitionURL attribute.
-
setDefinitionURL
setter for the definitionURL attribute.- Parameters:
definitionURL- new value for definitionURL.- See Also:
-
getEncoding
String getEncoding()A string describing the syntax in which the definition located at definitionURL is given.- Returns:
- value of the encoding attribute.
-
setEncoding
setter for the encoding attribute.- Parameters:
encoding- new value for encoding.- See Also:
-
getArgument
A convenience method to retrieve the child argument at the position referenced by index. Note that this is not necessarily the same as the index-th child Node of this Element; in particular, sep elements will not be counted.- Parameters:
index- Position of desired argument in the list of arguments. The first argument is numbered 1.- Returns:
- The Node retrieved.
-
insertArgument
A convenience method to insert newArgument before the current index-th argument child of this element. If index is 0, newArgument is appended as the last argument.- Parameters:
newArgument- Node to be inserted as the index-th argument. This will either be a MathMLElement or a Text node.index- Position before which newArgument is to be inserted. The first argument is numbered 1.Note that this is not necessarily the index of the Node in the list of child nodes, as nodes representing such elements as sep are not counted as arguments.newArgument- Node to be inserted as the index-th argument. This will either be a MathMLElement or a Text node.- Returns:
- The Node inserted. This is the element within the DOM.
-
setArgument
A convenience method to set an argument child at the position referenced by index. If there is currently an argument at this position, it is replaced by newArgument.- Parameters:
newArgument- Node to be inserted as the argument. This will either be a MathMLElement or a Text node.index- Position of the argument that is to be set to newArgument in the list of arguments. The first argument is numbered 1. Note that this is not necessarily the index of the Node in the list of child nodes, as nodes representing such elements as sep are not counted as arguments.newArgument- Node to be inserted as the argument. This will either be a MathMLElement or a Text node.- Returns:
- The Node inserted. This is the element within the DOM.
-
deleteArgument
void deleteArgument(int index) A convenience method to delete the argument child located at the position referenced by index.- Parameters:
index- Position of the argument to be deleted from the list of arguments. The first argument is numbered 1.
-
removeArgument
A convenience method to delete the argument child located at the position referenced by index, and to return it to the caller.- Parameters:
index- Position of the argument to be deleted from the list of arguments. The first argument is numbered 1.- Returns:
- A Node representing the deleted argument.
-