Trying to convert SVG to JSON
I want to convert an SVG file with [[https://github.com/JayDaley/XML-to-JSON-in-XSLT]] to JSON format. The SVG input, html and xsl files are as attached. Because xml-to-json.xsl requires an XSLT 2.0 processor, I need to use Saxon-CE; but there's an error in Chrome's console message: SaxonCE.XSLT20Processor 21: 20: 24.613 SEVERE: Exception java.lang.IllegalArgumentException in invokeTransform: non-integral Who could kindly help me with some hints?
RE: Trying to convert SVG to JSON - Added by Michael Kay about 5 years ago
Very hard to tell from this, I'm afraid.
I would strongly suggest that you migrate from Saxon-CE to Saxon-JS, which we are in a much better position to support. Saxon-CE is a dead end.
Also, Saxon-JS supports XSLT 3.0 which has a lot of built-in support for JSON (so you might be able to use the custom XML-to-JSON conversion as an alternative to the stylesheets you are running - though it would still need tailoring to your specific needs).
Please register to reply