<xsl:decimal-format group-separator="{$myseparator}"/>在 XSL 中 [英] <xsl:decimal-format group-separator="{$myseparator}"/> in XSL

查看:18
本文介绍了<xsl:decimal-format group-separator="{$myseparator}"/>在 XSL 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过使用变量或以任何方式设置十进制格式?类似吗?

is it possible to set decimal-format in any way by using a variable or similar?

示例:

我得到的错误:元素‘xsl:decimal-format’有一个属性‘grouping-separator’'$grouping_separator' 的非法值

The error I get : "The element 'xsl:decimal-format' has an attribute 'grouping-separator' with an illegal value of '$grouping_separator"

也不能通过 xsl:attribute 设置十进制格式.

Setting the decimal-format via a xsl:attribute is not possible also.

任何提示表示赞赏.

干杯,兰吉斯

推荐答案

XSLT 1.0XSLT 2.0 都声明 grouping-separator 属性的值必须是单个字符.似乎不允许 AVT.

The spec for XSLT 1.0 and XSLT 2.0 both state that the value for the grouping-separator attribute must be a single character. It appears that AVT is not allowed.

另一方面,可以有多种命名十进制格式,因此这可用于提供格式数字的可变性.

On the other side, one can have multiple named decimal formats, so this can be used to provide variability in formatting numbers.

这篇关于<xsl:decimal-format group-separator="{$myseparator}"/>在 XSL 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆