更新时间:2023-11-23 23:04:52
在 XPath 1.0 中使用以下表达式:
$vNum*($vNum >=0) - $vNum*($vNum < 0)
如果此表达式嵌入在 XSLT (XML) 属性中,则必须对 <
字符进行转义:
In case this expression is embedded in an XSLT (XML) attribute, the <
character must be escaped:
$vNum*($vNum >=0) - $vNum*($vNum < 0)
在 XPath 2.0 (XSLT 2.0) 中使用 abs()
函数.