\usemodule[mathml]
\startxmlsetups mml:formula
\edef\mmlformulalabel{\xmlatt{#1}{label}}
\edef\mmlformulatitle{\xmlatt{#1}{title}}
\doifsomethingelse {\mmlformulalabel\mmlformulatitle} {
\startplaceformula[reference=\mmlformulalabel,title=\mmlformulatitle]
\startformula
\xmlfirst{#1}{/mml:math}
\stopformula
\stopplaceformula
} {
\startformula
\xmlfirst{#1}{/mml:math}
\stopformula
}
\stopxmlsetups