Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.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
C# 无法在xslt中使用当前日期时间函数_C#_Xslt - Fatal编程技术网

C# 无法在xslt中使用当前日期时间函数

C# 无法在xslt中使用当前日期时间函数,c#,xslt,C#,Xslt,我无法在xslt中使用当前日期时间函数。这就是我的样式表声明的样子 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > 每次编译时,我都会收到一个错误,即当前日期时间不是XSLT函数 这就是我调用函数的方式 <xsl:variable name="currentTime" select="current-dateTime()" /> 如上所述,.net

我无法在xslt中使用当前日期时间函数。这就是我的样式表声明的样子

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

每次编译时,我都会收到一个错误,即当前日期时间不是XSLT函数

这就是我调用函数的方式

<xsl:variable name="currentTime" select="current-dateTime()" />


如上所述,.net framework不支持XSLT 2.0。执行自定义函数的一个解决方案是使用

那么,您是否使用像Saxon 9或XQSharp或AltovaXML工具这样的XSLT 2.0处理器呢?有很多XSLT 1.0处理器尚未更新以支持XSLT 2.0。不,我没有使用这些处理器。。我只是在使用.NET3.5转换xslt。如果您使用.NET3.5并希望使用XSLT2.0,那么您可以在我提到的XSLT2.0处理器之间进行选择。内置的
System.Xml.Xsl.xslcomiledTransform
不支持XSLT 2.0,它是XSLT 1.0处理器。