解析<mtext> </mtext>时出现Jeuclid错误

时间:2015-09-03 18:19:37

标签: mathml

我们一直使用Jeuclid没有问题,但最近我们开始接收包含 if (item.Field() == '' || item.Field() == null) return true; 的方程式,并使用Jeuclid解析此结果导致以下错误:

<mtext>&ThinSpace;</mtext>

似乎任何未加限制的&符号都会使解析失败,例如Error encountered during converion process java.io.IOException: Stream Closed at java.io.FileInputStream.read0(Native Method) at java.io.FileInputStream.read(FileInputStream.java:210) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2889) ... <mtext>&</mtext>。转义&符号(<mtext>&something</mtext>)会使解析工作,但在这种情况下我们没有得到所需的空格。

我在Mathjax(客户端渲染器)中测试了相同的mathml代码,它运行正常。

此外,这似乎是MathML标准的一部分:http://www.w3.org/TR/REC-MathML/chap3_2.html

任何线索?

1 个答案:

答案 0 :(得分:0)

我也有这个问题,我解决了它转换所有&amp; \ nbsp;在调用转换函数之前到空格。

相关问题