-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 に答える