XSLT错误无法加载样式表:运算符或')'预期

时间:2017-06-30 07:24:53

标签: xslt-2.0

需要帮助/专家建议并出错:无论何时系统尝试XSLT,都无法加载stylesheet.com.sap.engine.lib.xsl.xpath.XPathException:Operator或')'。

以下是我的XSLT代码:

  <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
</xsl:template>
<xsl:template match="/">
    <xsl:for-each-group select="MT_RemittanceAdvice/body/article" group-by="site">
        <xsl:result-document method="xml" href="\\phvsvrftp01\SM\DEV\RA\IN\RA_{position()}-output.xml">
            <xsl:apply-templates select="/*"/>
        </xsl:result-document>
    </xsl:for-each-group>
</xsl:template>
<xsl:template match="MT_RemittanceAdvice/body/article">
    <xsl:if test=" .intersect current-group()">
        <xsl:next-match/>
    </xsl:if>
</xsl:template>

我可以使用ALTOVA XMLSPY

成功运行此XSLT

以下是我的源XML

           <?xml version="1.0" encoding="UTF-8"?>
<MT_RemittanceAdvice>
<header>
  <companyName>Dept Store</companyName>
  <DocumentType>Remittance Advice</DocumentType>
  <postDate>06/01/2017 03:27:16</postDate>
  <payeeName>xxxxxxxxxxxx</payeeName>
  <checkDate>05/31/2017</checkDate>
  <checkNumber>6321713</checkNumber>
  <region/>
  <amount>13,570.80</amount>
</header>
<body>
   <article>
        <transCode/>
        <poNumber>2023090</poNumber>
        <docRef/>
        <site>MY SHOPPINGLANE CEBU, CORP</site>
        <grossAmount>55.80</grossAmount>
        <discount>-0.50</discount>
        <netAmount>-55.30</netAmount>
   </article>
   <article>
        <transCode/>
        <poNumber>210205</poNumber>
        <docRef/>
        <site>ACE HARDWARE PHILS., INC.</site>
        <grossAmount>55.80</grossAmount>
        <discount>-0.50</discount>
        <netAmount>-55.30</netAmount>
    </article>
   <article>
        <transCode/>
        <poNumber>20239479</poNumber>
        <docRef/>
        <site>ACE HARDWARE PHILS., INC.</site>
        <grossAmount>0.00</grossAmount>
        <discount>80.44</discount>
        <netAmount>8,928.62</netAmount>
        </article>
</body>
<footer>
       <totalAmount>0.00</totalAmount>
       <ewtAmount>0.00</ewtAmount>
       <arItcc>0.00</arItcc>
       <netPayable>13,570.80</netPayable>
       <importantRemarks><![CDATA[Please review your Details of Payment immediately. Discrepancy noted should be reported within 60 days from credit date. Any request for reconciliation beyond this period shall not be given priority.]]></importantRemarks>
</footer>
</MT_RemittanceAdvice>      

系统属性的结果

     <?xml version="1.0" encoding="UTF-8"?>
 <systemProperties>
    <xslVersion>3.0</xslVersion>
    <xslVendor>Saxonica</xslVendor>
    <xslVendorURL>http://www.saxonica.com/</xslVendorURL>
    <xslProductName>SAXON</xslProductName>
    <xslProductVersion>HE 9.8.0.2</xslProductVersion>
    <xslIsSchemaAware>no</xslIsSchemaAware>
    <xslSupportsSerialization/>
    <xslSupportsBackwardCompatibility>no</xslSupportsBackwardCompatibility\
 </systemProperties>

0 个答案:

没有答案