XSL:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" exclude-result-prefixes="wp wne w10 w ve o r m v" version="2.0">
<xsl:output method="text"/>
<xsl:param name="styleName"/>
<xsl:template match="w:p">
<xsl:apply-templates/><xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="w:r[not
((parent::w:hyperlink[@w:anchor[matches(.,concat('^(',$styleName,')')),'i']]))]">
<xsl:value-of select="replace(., '.', '＀')"/>
</xsl:template>
</xsl:stylesheet>
在处理上述XSL时,我收到以下错误,
可恢复的错误:
Recoverable error on line 11
FORG0006: An error occurred matching pattern {w:r[not
((parent::w:hyperlink[@w:anchor[matches(.,concat('^(',$styleName,')')),'i']]))]}:
Effective boolean value is not defined for a sequence of two or more items starting with a boolean
请帮助。我无法弄清楚这一点。
答案 0 :(得分:0)
问题在于'i'[添加了修饰符以执行不区分大小写的搜索],它在matches()方法之后指定。