Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.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
XSL到XML生成中的命名空间问题_Xml_Xslt_Saxon - Fatal编程技术网

XSL到XML生成中的命名空间问题

XSL到XML生成中的命名空间问题,xml,xslt,saxon,Xml,Xslt,Saxon,我使用SAXON生成XML,但是namepspaces会附加生成的XML XSL --> <?xml version = "1.0" encoding = "UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.xfa.org/schema/xfa-data/1.0/" xmlns:ext="http:/

我使用SAXON生成XML,但是namepspaces会附加生成的XML

XSL --> 
<?xml version = "1.0" encoding = "UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.xfa.org/schema/xfa-data/1.0/" 
xmlns:ext="http://myorg.com">.........
<ELEM>
     <xsl:value-of select="$application/ELEM" />
 </ELEM>
<LINE_4> ( Using Saxon Extension Function )
   xsl:value-of select="ext:FooFunction("someValue")" />
</LINE_4>
XSL-->
.........
(使用Saxon扩展函数)
xsl:value of select=“ext:fooofunction(“someValue”)”/>
生成的输出是

<ELEM xmlns="http://www.xfa.org/schema/xfa-data/1.0/" xmlns:ext="http://myorg.com">NEW JERSEY</ELEM>
<LINE_4 
xmlns="http://www.xfa.org/schema/xfa-data/1.0/" xmlns:ext="http://myorg.com">12.99%
</LINE_4>
新泽西州 12.99%
我不希望名称空间出现在生成的xml中。或者它应该属于默认的XML名称空间,即
http://www.xfa.org/schema/xfa-data/1.0/

我想您只是想在
xsl:stylesheet
元素上使用
exclude result prefixes=“ext”

现在我通常使用exclude result prefixes=“#all”作为样板。10次中有9次它能给你想要的。