Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/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
Xslt xsl:include命令中的绝对虚拟路径_Xslt_Xpath_Include_Href_Msxml - Fatal编程技术网

Xslt xsl:include命令中的绝对虚拟路径

Xslt xsl:include命令中的绝对虚拟路径,xslt,xpath,include,href,msxml,Xslt,Xpath,Include,Href,Msxml,我想知道xsl:include命令是否支持绝对虚拟路径? 对于带有相对路径的ex.语句 <xsl:include href="../example.xsl"/> 效果绝对不错。但当我经过一条绝对虚拟的路径时 <xsl:include href="/some_folder_inside_root/example.xsl"/> 我收到一条错误消息,当前文件无法定位。 这两个路径指向同一个文件,如果我在纯html中将它们用作href,则它们是正确的。href属性是一

我想知道xsl:include命令是否支持绝对虚拟路径? 对于带有相对路径的ex.语句

<xsl:include href="../example.xsl"/>

效果绝对不错。但当我经过一条绝对虚拟的路径时

<xsl:include href="/some_folder_inside_root/example.xsl"/>

我收到一条错误消息,当前文件无法定位。
这两个路径指向同一个文件,如果我在纯html中将它们用作href,则它们是正确的。

href属性是一个URI(不是文件名)。您的示例“/some\u folder\u in_root/example.xsl”不是绝对URI,而是相对URI。如果您的基本URI(主样式表的URI)是http URI,那么它将从该网站的根文件夹中进行选择


如果要使用根文件名,请使用绝对URI
file:///some-folder/example.xsl

如何在经典ASP及其API中使用MSXML?主样式表是通过HTTP加载的吗?对不起,也许我只是使用了错误的术语。绝对虚拟路径指的是我网站的根文件夹。谢谢你的回答!