Skip to main content

I could convert xml data set to json format using attached xslt transformer, I tested trasformer using online tools and it’s working fine for online tools.

But when I am using that transformer from the IFS for the same data set( same format ), the application msg is giving below error.

 

In my xslt I use “xml-to-json” to print the data

 

What should I do for this issue?

IFS only supports basic xslt Version 1.0. 

 

I believe you are using functions from a newer version of XSLT.

 


IFS only supports basic xslt Version 1.0. 

 

I believe you are using functions from a newer version of XSLT.

 

IFS uses the XALAN (Xalan-Java Version 2.7.1 (apache.org)) xsl engine which supports only xslt 1.0 

Seems the function  xml-to-json  is part of xslt 3.0 spec, which caused the error.

As a simple answer to your question,  you can’t use xml-to-json function and has to use the ‘old school’ way for xml to json transformation.

Some good reading in SOF: xsl to convert xml to json - Stack Overflow

Otherwise you can create a java transformer instead xsl where you can easily convert xml to json using a preferred library like Json-java by stleary 

 

At the mean time I hope this will be a good point for IFS RnD to think of upgrading the xsl engine  ;)

 

Cheers!

Damith