avatar image
Former Member

Could not load stylesheet.com.sap.engine.lib.xsl.xpath.XPathException: Operator or ')' expected

Below is my XSL Code. I am able to run this XSL using AltovaXML Spy.

Also did the instructions based on this blog to use XSLT2.0:

 <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>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 03, 2017 at 06:24 AM

    Hi Bryan,

    You XSLT syntax is not right you should end the tag stylesheet:

    </xsl:stylesheet>

    Have you checked this blog and the external links pointed it

    https://blogs.sap.com/2014/10/14/how-to-import-and-use-xslt-20-mappings-in-sap-pipo/

    ?

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello, seems my copy-paste of the XSLT code was incorrect. Below is the full xslt: Still getting this error when trying it in Operations Mapping-Test:

      "Transformer Configuration Exception occurred when loading XSLT RA_Split.xsl; details: Could not load stylesheet.com.sap.engine.lib.xsl.xpath.XPathException: Operator or ')' expected.

      See error logs for details"

      I also used that blog as reference to do the necessary configuration changes in the Exchange Profile. I imported SAXON9HE as Imported Archives in ESR.

      <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="file:////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>
      </xsl:stylesheet>
      
      
      
Skip to Content