如何将属性的格式与 .xsl 样式表 xml 1.0 版中的 "a.b.c.com" 相匹配?

How to match an attribute's format to "a.b.c.com" in .xsl stylesheet xml version 1.0?

我需要根据主机名的格式执行一些操作:a.b.c.com,(例如:she01-qlv.abc.jio.com)。他们是否有匹配此格式的内置函数?

XSLT 1.0 不支持正则表达式。如果你想要一些相对简单的东西,你可以使用以下方法测试输入是否包含 3 个句点:

translate($host, translate($host, '.', ''), '') = '...'

并以 .com 结尾,使用:

substring($host, string-length($host)-3) = '.com'

然而,这也会传递像 abc...com 这样的输入。