-1

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>&#10;</xsl:text>
</xsl:template>

<xsl:template match="w:r[not  
             ((parent::w:hyperlink[@w:anchor[matches(.,concat('^(',$styleName,')')),'i']]))]"> 
  <xsl:value-of select="replace(., '.', '&#xFF00;')"/>
</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

请帮忙。我无法弄清楚这一点。

4

1 回答 1

0

问题在于 'i' [添加修饰符以执行不区分大小写的搜索],它是在 matches() 方法之后指定的。

于 2012-11-19T08:47:05.693 回答