为什么 `<input pattern="^[^ ]{2,}.*[^ ]$">` 会触发“XPath 处理错误:需要二元运算符”?

问题描述 投票:0回答:1
xslt pattern-matching html-input
1个回答
0
投票

XSLT 在属性值中使用大括号

{
}
作为所谓的属性值模板来分隔嵌入的 XPath 表达式。因此,在 XSLT 中,在此类属性中,如果您想要文字
{
}
,则需要将它们加倍,例如
{{
}}
,例如
pattern="^[^ ]{{2,}}.*[^ ]$"

© www.soinside.com 2019 - 2024. All rights reserved.