× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

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)

My Apologies that the paragraph above digresses from RPGLE but my intentions are pure in wanting to be able to have a simple compiled utility program that I can then call from RPGLE to accomplish what RPGLE doesn't for XSL.

Cheers, Peter


#####################################################################################

This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda Advantage.
If you need assistance, please contact Veda Advantage on either :-
Australia 1300-762-207 or New Zealand +64 9 367 6200

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.