如何找到XSLT 1.0当前日期如何找到XSLT 1.0当前日期(how to find the c

2019-05-12 10:18发布

我在我的XSLT代码检索当前日期查找的麻烦。 我使用的版本1.0和MSXSL.EXE应用触发我的XSLT代码。 我试着用下面的代码行来实现这个功能,但它不工作。 貌似1.0版不支持当前的日期功能。 能否请您提供一个解决方案,这将对于XSLT 1.0工作。

               <xsl:value of select="current-date()"/>

Answer 1:

有在XSLT 1.0没有电流-date()函数。

如果您的处理器支持,您可以使用日期,时间()EXSLT扩展功能。 否则,你将不得不通过在运行时的日期作为参数传递给样式表,或从Web服务得到它。



Answer 2:

With MSXML you can use extension functions done in JScript or VBScript, see http://www.exslt.org/date/functions/date-time/index.html for details and an implementation http://www.exslt.org/date/functions/date-time/date.msxsl.xsl which should work with MSXML.



文章来源: how to find the current date in XSLT 1.0
标签: xml xslt