writer.writeNamespace(null, ASTNode.URI_MATHML_DEFINITION);
if (isSBMLNamespaceNeeded) {
// writing the SBML namespace
SBMLDocument doc = null;
SBase sbase = astNode.getParentSBMLObject();
String sbmlNamespace = SBMLDocument.URI_NAMESPACE_L3V1Core;
if (sbase != null) {
doc = sbase.getSBMLDocument();
sbmlNamespace = doc.getSBMLDocumentNamespaces().get("xmlns");
}
writer.writeNamespace("sbml", sbmlNamespace);
}