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
Xslt Xalan日期扩展问题_Xslt_Xalan_Exslt - Fatal编程技术网

Xslt Xalan日期扩展问题

Xslt Xalan日期扩展问题,xslt,xalan,exslt,Xslt,Xalan,Exslt,我正在尝试使用xalan的ubuntu cli版本: Xalan version 1.10.0 Xerces version 2.8.0 我的问题是如何使用日期函数。我试着这样做: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmln

我正在尝试使用xalan的ubuntu cli版本:

Xalan version 1.10.0
Xerces version 2.8.0
我的问题是如何使用日期函数。我试着这样做:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date">

<xsl:import href="date/date.xsl" />
<xsl:output method="text" indent="yes" />
date: <xsl:value-of select="date:date()" />
</xsl:stylesheet>

要使这些日期函数正常工作,我需要更改哪些文件或内容?

您需要使用更高版本的Xalan

EXSLT扩展

XalanJava支持EXSLT 主动提供一套 标准扩展函数和 元素添加到XSLT用户。爪哇岛 包括 以下EXSLT扩展模块:

EXSLT通用函数EXSLT数学 函数EXSLT集合函数

EXSLT日期和时间函数

EXSLT动态函数

EXSLT字符串函数

EXSLT func:函数和 func:结果元素(请参见EXSLT- func:函数)

Xalan-C++包括测试版 函数的四种实现方式 EXSLT名称空间的 已在中调用扩展名 Xalan名称空间)


从中,它看起来只实现了。

文档显示,它为该子集提供了内置的beta版实现,但并没有说您不能从exslt.org导入和使用这些函数。你为什么不能?Xalan-c++不支持导入函数吗


请注意,我能够使模板正常工作。只是没有函数。

这不是Xalan Java!它是Xalan C++,它是最新版本。如果XalaC++不实现EXLLT日期,可以使用JS或< XeleRever附带的DATEYTIME库使用“<代码> <代码>元素,并且是纯XSLT(没有扩展函数)。事实上,XSELRealAt27.MSI包含马丁的纯XSL实现的示例\Cub\DATETMEMELIL.XSL。“骨髓”Rowlinson。“对使用没有限制”。请看@Vadzim,是的,但由于不再提供XSelerator(如果有新的开发,请纠正我),我没有提及这一事实,因为人们将无法找到XSelerator,并且会感到沮丧。我在上面写了评论,仍然为这些人提供下载链接。)
XSLException Type is: XalanXPathException
Message is: The function number 'http://exslt.org/dates-and-times:date' is not available. (file:///home/user/test.xsl, line x, column y)