我正在尝试为mathml渲染SVG。它在chrome上看起来很好,但在IE中,svg对其标签有额外的属性我们如何避免添加这些附加属性。请尝试在chrome和IE中将mathml下面呈现为SVG。您可以看到生成的SVG标记的差异(在两个浏览器中附加scrrenshots) MathML用于渲染:
"<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn style="font-family:inherit;font-style:inherit;" id="63201617503163">1</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503164">2</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503165">3</mn><mtable columnalign="right" align="baseline 2" rowspacing="0.0ex" id="63201617503166"><mtr><mtd><mrow><mn style="font-family:inherit;font-style:inherit;" id="63201617503167">1</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503168">2</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503169">3</mn></mrow></mtd></mtr><mtr><mtd><menclose notation="longdiv"><mrow><mn style="font-family:inherit;font-style:inherit;" id="63201617503170">1</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503171">2</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503172">3</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503173">4</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503174">5</mn></mrow></menclose></mtd></mtr><mtr><mtd><munder><mrow><mn style="font-family:inherit;font-style:inherit;" id="63201617503175">1</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503176">2</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503177">3</mn></mrow><mrow><mo>_</mo></mrow></munder><mphantom><mrow><mn>45</mn></mrow></mphantom></mtd></mtr><mtr><mtd><mrow><mn style="font-family:inherit;font-style:inherit;" id="63201617503178">1</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503179">2</mn><mn style="font-family:inherit;font-style:inherit;" id="63201617503180">3</mn></mrow></mtd></mtr></mtable></mrow></math>"