Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/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 找不到名为的匹配单参数函数_Xslt_Xslt 2.0 - Fatal编程技术网

Xslt 找不到名为的匹配单参数函数

Xslt 找不到名为的匹配单参数函数,xslt,xslt-2.0,Xslt,Xslt 2.0,我使用了以下XSLT和手写笔。无论我做什么,我都会收到以下第50行的错误消息。 找不到名为{}replaceyyyymddtoxsddate()的匹配1参数函数 此时的encoding=“UTF-8”没有帮助 添加msxsl:assembly和msxsl:using没有帮助 感谢提示和帮助。 你好,托拉吉 ///将YYYYMMDD日期替换为XSD日期。 /// ///字符串输入。 /// 公共字符串replaceyyymmdtoxsddate(字符串stringInput) { Sy

我使用了以下XSLT和手写笔。无论我做什么,我都会收到以下第50行的错误消息。 找不到名为{}replaceyyyymddtoxsddate()的匹配1参数函数

  • 此时的encoding=“UTF-8”没有帮助
  • 添加msxsl:assembly和msxsl:using没有帮助 感谢提示和帮助。 你好,托拉吉

///将YYYYMMDD日期替换为XSD日期。
/// 
///字符串输入。
/// 
公共字符串replaceyyymmdtoxsddate(字符串stringInput)
{
System.String resultStr=“NotFound”;
字符串year=null;
字符串month=null;
字符串day=null;
尝试
{
如果(!System.String.IsNullOrEmpty(stringInput)&&(stringInput.Length>7))
{
//IsDigitsOnly
foreach(stringInput中的字符c)
{
如果(c<'0'| c>'9')
return resultStr=“输入字符串值无效”;
}
年份=字符串输入。子字符串(0,4);
月=stringInput.Substring(4,2);
day=stringInput.Substring(6,2);
resultStr=String.Format(“{0}-{1}-{2}”,年、月、日);
}
其他的
{
resultStr=“无效的输入字符串值”;
}
}
抓住
{
resultStr=“replaceyyymddtoxsddatetime中的ExceptionError”;
}
返回结果TR;
}
]]>

msxsl:script
是Microsoft在某些XSLT1.0处理器中实现的专有功能,如各种
MSXML
版本(但不支持调用C#等.NET语言,只能调用VBScript或JScript扩展函数)或类似
xslcomiledTransform
。我不知道您可以在Stylus Studio中使用哪些XSLT处理器,但我认为默认情况下它使用Saxon,并且不支持特定于Microsoft的扩展来调用C#。因此,您需要检查Stylus Studio是否允许您切换到Microsoft的
XslCompiledTransform
作为XSLT处理器