title: XSLT Error Could not load stylesheet: Operator or ')' expected
body: <p>Need assistance/expert advice with error: Could not load stylesheet.com.sap.engine.lib.xsl.xpath.XPathException: Operator or ')' expected, whenever system tries to XSLT.  </p>
  
  <p>Below is my XSLT Code:</p>
  
  <pre><code>  &lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  &lt;xsl:template match="@*|node()"&gt;
      &lt;xsl:copy&gt;
          &lt;xsl:apply-templates select="@*|node()"/&gt;
      &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="/"&gt;
      &lt;xsl:for-each-group select="MT_RemittanceAdvice/body/article" group-by="site"&gt;
          &lt;xsl:result-document method="xml" href="\\phvsvrftp01\SM\DEV\RA\IN\RA_{position()}-output.xml"&gt;
              &lt;xsl:apply-templates select="/*"/&gt;
          &lt;/xsl:result-document&gt;
      &lt;/xsl:for-each-group&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="MT_RemittanceAdvice/body/article"&gt;
      &lt;xsl:if test=" .intersect current-group()"&gt;
          &lt;xsl:next-match/&gt;
      &lt;/xsl:if&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am able to run this XSLT successfully using ALTOVA XMLSPY    </p>
  
  <p>Below is my source XML</p>
  
  <pre><code>           &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;MT_RemittanceAdvice&gt;
  &lt;header&gt;
    &lt;companyName&gt;Dept Store&lt;/companyName&gt;
    &lt;DocumentType&gt;Remittance Advice&lt;/DocumentType&gt;
    &lt;postDate&gt;06/01/2017 03:27:16&lt;/postDate&gt;
    &lt;payeeName&gt;xxxxxxxxxxxx&lt;/payeeName&gt;
    &lt;checkDate&gt;05/31/2017&lt;/checkDate&gt;
    &lt;checkNumber&gt;6321713&lt;/checkNumber&gt;
    &lt;region/&gt;
    &lt;amount&gt;13,570.80&lt;/amount&gt;
  &lt;/header&gt;
  &lt;body&gt;
     &lt;article&gt;
          &lt;transCode/&gt;
          &lt;poNumber&gt;2023090&lt;/poNumber&gt;
          &lt;docRef/&gt;
          &lt;site&gt;MY SHOPPINGLANE CEBU, CORP&lt;/site&gt;
          &lt;grossAmount&gt;55.80&lt;/grossAmount&gt;
          &lt;discount&gt;-0.50&lt;/discount&gt;
          &lt;netAmount&gt;-55.30&lt;/netAmount&gt;
     &lt;/article&gt;
     &lt;article&gt;
          &lt;transCode/&gt;
          &lt;poNumber&gt;210205&lt;/poNumber&gt;
          &lt;docRef/&gt;
          &lt;site&gt;ACE HARDWARE PHILS., INC.&lt;/site&gt;
          &lt;grossAmount&gt;55.80&lt;/grossAmount&gt;
          &lt;discount&gt;-0.50&lt;/discount&gt;
          &lt;netAmount&gt;-55.30&lt;/netAmount&gt;
      &lt;/article&gt;
     &lt;article&gt;
          &lt;transCode/&gt;
          &lt;poNumber&gt;20239479&lt;/poNumber&gt;
          &lt;docRef/&gt;
          &lt;site&gt;ACE HARDWARE PHILS., INC.&lt;/site&gt;
          &lt;grossAmount&gt;0.00&lt;/grossAmount&gt;
          &lt;discount&gt;80.44&lt;/discount&gt;
          &lt;netAmount&gt;8,928.62&lt;/netAmount&gt;
          &lt;/article&gt;
  &lt;/body&gt;
  &lt;footer&gt;
         &lt;totalAmount&gt;0.00&lt;/totalAmount&gt;
         &lt;ewtAmount&gt;0.00&lt;/ewtAmount&gt;
         &lt;arItcc&gt;0.00&lt;/arItcc&gt;
         &lt;netPayable&gt;13,570.80&lt;/netPayable&gt;
         &lt;importantRemarks&gt;&lt;![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.]]&gt;&lt;/importantRemarks&gt;
  &lt;/footer&gt;
  &lt;/MT_RemittanceAdvice&gt;      
  </code></pre>
  
  <p>Result of system-property</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;systemProperties&gt;
      &lt;xslVersion&gt;3.0&lt;/xslVersion&gt;
      &lt;xslVendor&gt;Saxonica&lt;/xslVendor&gt;
      &lt;xslVendorURL&gt;http://www.saxonica.com/&lt;/xslVendorURL&gt;
      &lt;xslProductName&gt;SAXON&lt;/xslProductName&gt;
      &lt;xslProductVersion&gt;HE 9.8.0.2&lt;/xslProductVersion&gt;
      &lt;xslIsSchemaAware&gt;no&lt;/xslIsSchemaAware&gt;
      &lt;xslSupportsSerialization/&gt;
      &lt;xslSupportsBackwardCompatibility&gt;no&lt;/xslSupportsBackwardCompatibility\
   &lt;/systemProperties&gt;
  </code></pre>