/scripts/ahub.form.attachments.js
0

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

Jul 03, 2017 at 02:37 AM

36

avatar image

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>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iñaki Vila Jul 03, 2017 at 06:24 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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>



0
Skip to Content