cannot use the current-datetime function in xslt

2019-05-31 15:44发布

问题:

I am not able to use the current-dateTime function in xslt. this is what my stylesheet declaration looks like.

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

Every time I compile I get an error that current-dateTime is not a XSLT function

And this is how I am calling the function.

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

回答1:

As mentioned above, .net framework does not support XSLT 2.0. One solution for executing custom functions is to use Xslt Extension Objects



标签: c# xslt