AnsweredAssumed Answered

Can XSLT script be put in dynamic process property instead of using file?

Question asked by clint-agustin.palanca944319 on Dec 27, 2017
Latest reply on Aug 15, 2018 by britta

I have put the XSLT script below to process the xml requirement. XSLT script is working if write and read in a file. But I would like not to use file system since it will trigger complex service management process. I have tried to put it in dynamic process property that will be called by the groovy script in a runtime. But i'm getting "Could not construct XSLTransformer" error.

 

Please help to put it in dynamic process property.

 

Here's the sample xslt script.

 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="utf-8" method="xml" version="1.0" indent="yes"/>
<xsl:template match="/">
<xsl:for-each select="Email">
<Email>
<xsl:for-each select="Order">
<Order>
<xsl:copy-of select="*|@*"/>
</Order>
</xsl:for-each>
<OrderDetails>
<xsl:for-each select="OrderDetails/OrderDetail">
<xsl:sort order="ascending" select="@SequenceNumber" data-type="number"/>
<OrderDetail>
<xsl:copy-of select="*|@*"/>
</OrderDetail>
</xsl:for-each>
</OrderDetails>
<xsl:for-each select="Payments">
<Payments>
<xsl:copy-of select="*|@*"/>
</Payments>
</Email>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Outcomes