|
Hi,This is very interesting as an alternative to a JVM based solution.
RPGLE now has very useful XML parsing functions built-in, which we use much to our benefit.
But it would be nice if there was functionality to perform XSL transformations without having to build our own utilities.
To achieve this I had to find the java code (not much) to create a custom wrapper class that uses javax.xml.transform etc to transform an XML file using an XSL file into an HTML file.
But the initial JVM load is annoying (without resorting to data queues and such).
However, we've just upgraded to V6R1 and I happened to look at the XML Toolkit and noticed there is XSL support via C++.
I thought this might be worth a look since a compiled C++ routine should give better performance than java (well that's the bet).
I discovered that the installed QXSLDEV110 library has the CLP source for CRTXSLCPP whose text is "CREATES XALAN C++ TEST/SAMPLE PGMS IN GIVEN LIB".
If you compile this then, provided that you also have the ILE C++ compiler installed, you can call this CRTXSLCPP program which then compiles all the necessary C++ programs for you. What a breeze, and without having to know any C++.
Stumbling around the folder of samples in \QIBM\ProdData\xmltoolkit2\xsl_1100\samples, reveals that one of the C++ programs compiled is called TESTXSLT which does just what my existing custom java transform does.
And it seems to work, at least with the simple things I've tried at first.
But, on a mor complex XSL stylesheet, whenever it finds the format-number() function in an XSL stylesheet it throws an annoying message "Warning: The function 'format-number()' is not implemented."
Of course, I don't understand this problem but wondered if anybody might point me in the right direction. ( might have something to do with an ICU thing)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.