Skip to main content
Question

XML to JSON, XSLT transformer issue

  • February 12, 2021
  • 2 replies
  • 397 views

Forum|alt.badge.img+6

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?

This topic has been closed for comments

2 replies

Mike.Hollifield
Hero (Partner)
Forum|alt.badge.img+8

IFS only supports basic xslt Version 1.0. 

 

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

 


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 865 replies
  • February 24, 2021
Mike.Hollifield wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings