0

我有我的xml的以下部分。

<para>As set out in paragraph 2.006 above it is also possible that a Hong Kong Court may appoint an overseas liquidator to act in a Hong Kong liquidation provided that the court is satisfied as to his suitability to act. </para>

在这里我想检查'。'之前是否有空格。在 2 之前('.' 之前的 2 个位置),我使用以下语句获取它但无法获取它,但它不起作用。请让我知道如何修改它。

 <xsl:if test=" contains(substring-before(substring(current(),2,1),'.'),' ')"/>

谢谢

4

1 回答 1

3

似乎这是您喜欢做的事情:

     <xsl:if test=" contains( 
           substring (current(),
                      string-length(
                            substring-before(current(), '.')
                       ) -1,2)
                ,' ')">

这将测试第一个点“。”之前的最后两个字符。如果它们包含空格。(我不确定是否应该对最后两个或三个字符进行测试。但这很容易适应)

于 2013-04-26T13:41:32.863 回答