Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 命名空间不在Edge和IE上工作的实体_Xml_Internet Explorer_Xslt_Microsoft Edge_Xml Namespaces - Fatal编程技术网

Xml 命名空间不在Edge和IE上工作的实体

Xml 命名空间不在Edge和IE上工作的实体,xml,internet-explorer,xslt,microsoft-edge,xml-namespaces,Xml,Internet Explorer,Xslt,Microsoft Edge,Xml Namespaces,我有一个XML文件及其XSL转换文件: simple.xml: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="simple.xsl"?> <!DOCTYPE simple [ <!ENTITY ie "<expan>id est</expan>"> ]> <text xmlns="http://www.

我有一个XML文件及其XSL转换文件:

simple.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="simple.xsl"?>

<!DOCTYPE simple [
  <!ENTITY ie "<expan>id est</expan>">
]>

<text xmlns="http://www.tei-c.org/ns/1.0">
  I am happy &ie; I am not upset.
</text>
在Firefox上打开XML文件时,正确生成了范围:

但在Edge和Internet Explorer上,未应用
n:expan
模板,因此
id est
不在范围内,也不以红色书写:

当我删除名称空间和所有
n:
前缀时,它在Edge和IE上运行良好。此外,当我删除
IE
实体并直接写入
时,我很高兴我没有感到不安。
它在两种浏览器上都有效

我应该如何使它同时与实体和名称空间一起工作


感谢您的帮助。

显然不同的处理器对
expan
元素所属的名称空间有不同的想法。我在自己的测试中看到,Saxon和Xalan将它放在其父
文本
的命名空间中,而libxslt认为它不在命名空间中

我应该如何使它同时与实体和名称空间一起工作

那么:

<xsl:template match="expan | n:expan">

<xsl:template match="expan | n:expan">