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
Xml 我需要有关XSL路径目录的帮助_Xml_Xslt - Fatal编程技术网

Xml 我需要有关XSL路径目录的帮助

Xml 我需要有关XSL路径目录的帮助,xml,xslt,Xml,Xslt,C:drive是我当前的xsl路径 当我使用这个XSL代码来获取XML文件时,它工作得很好 <xsl:variable name="Path"> <xsl:value-of select="'file:///C:'"/> </xsl:variable> 但是,当我使用此XSL代码获取另一个XML文件时,它不起作用 <xsl:variable name="Path1"> <xsl:value-of select="'file:///E:'

C:drive是我当前的xsl路径

当我使用这个XSL代码来获取XML文件时,它工作得很好

<xsl:variable name="Path">
<xsl:value-of select="'file:///C:'"/>
</xsl:variable>

但是,当我使用此XSL代码获取另一个XML文件时,它不起作用

<xsl:variable name="Path1">
<xsl:value-of select="'file:///E:'"/>
</xsl:variable>

您给我们看的代码没有问题。问题在别处

顺便说一下,这是非常低效的:

<xsl:variable name="Path">
<xsl:value-of select="'file:///C:'"/>
</xsl:variable>

你应该使用

<xsl:variable name="Path" select="'file:///C:'"/>


因为当您只需要一个简单的字符串时,不需要创建新的XML文档。

您的代码只是将变量设置为字符串值。对于变量,它不关心它是文件还是人名,它只是文本。这个变量在哪里使用?