× 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.



> From: Joe Pluta
>
> Thus, the only issue is to generate the XML output.  This is most
> easily done by writing to an IFS file, but if those APIs seem to
> be too much work, just write to a physical file and then use CPYSTMF.

By the way, let's be very clear.  The output from the RPG program would be
very simple:

<REPORT>
  <TEXT>Hello World</TEXT>
</REPORT>

It would be the XSLT stylesheet that would add the colors and fonts.  The
only thing missing from this simple case might be to add a style:

<REPORT>
  <TEXT>Hello World</TEXT>
  <TEXT STYLE=2>How are you doing?</TEXT>
</REPORT>

The XSLT transformation would then determine the font type, size and color
based on the style.  This then means that the program logic doesn't need to
change in order to do things like changing fonts and colors, or adding logos
and watermarks and the like.

There is definitely some upfront work creating the XSLT stylesheet, as well
as defining the content of the document above.  This is called "semantic
XML", which means it has little or no innate formatting, primarily just
data.  The real power of this approach is that the generated semantic XML
can also be used as the response to Web Services request.

And this can all be done on the iSeries.  FOP is a 100% pure Java Open
Source project which you can download and install on your iSeries.
Personally, though, I'd rather generate the semantic XML on the iSeries and
then have a PC transform it to the desired output, using the cheap PC cycles
to do the grunt work.

Examples of the XSLT stylesheet required to convert semantic XML to XSL-FO
can be found here:

http://www.antennahouse.com/XSLsample/XSLsample.htm

It's a significant upfront investment, to be sure.  You have to actually
learn quite a few new things.  But once done, the benefits can be
extraordinary.  You can easily generate invoices with completely different
layouts from the same output by simply pointing to a different style sheet.
You can change paper sizes and the fonts that are necessary to use the paper
size without ever touching the logic of the program.

If you live and die by printing on different forms, you might want to take a
look at this stuff.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.