【发布时间】:2011-09-25 00:56:53
【问题描述】:
为什么这不起作用? XSL 可以只使用返回字符串的 PHP 函数吗?
<xsl:if test="string-length(substring-before(TipoImm, '/')) > 0">
<xsl:element name="test">
<xsl:value-of select="php:functionString('implode',
(php:function('explode', TipoImm, '/')), '-')" />
</xsl:element>
</xsl:if>
【问题讨论】:
-
问题是您试图将 PHP 函数调用传递给
implode,而它需要 XPath 表达式吗?
标签: php arrays function xslt php-extension