Hi Sergio,
Sorry, I should have been a little clearer with my reasons for asking.
The reason for asking:
I need HTML strings to be generated from XML strings (selected from a Queue table), using a pre-defined XSL file provided to me. This HTML is then sent as the body (or as an attachment) of a mail, every day at a certain time.
The Solution:
I have a Table in HANA, call it Email_Distribution_Queue, that contains an "E-Mail" field, and an "E-Mail Body" field (amongst other flags and useful fields).
The E-Mail body is a generated XML String from various parts of Data.
The E-Mail field can contain one or more email addresses, operated by a comma.
Every day data will be inserted into this table, and needs to be "Processed" for sending the emails out.
Using a .xsjob file on HANA, a schedule is created to call the XSJS file, to do the email sending, at some specific interval. (Let's call it every minute)
So, when the XSJOB calls the XSJS, it needs to build up the $.net.Mail() object, which when done, gets sent with the .send() method. The $.net.Mail() object, needs to specify the 'Text' as the "Transformed" HTML text. This HTML is generated by passing in the XML to the XSLT file, which returns the HTML for sending. The XSLT file will add formatting/rules/links and other things to the HTML file to make it ready for sending to the users.
The Problem as far as I understand it:
There is no "Client-Side" involved, as the XSJS gets executed on the XS engine by the XSJOB, and thus, the XSLT formatting needs to occur at runtime, before the mail is sent.
I hope I've explained myself sufficiently, and would welcome any input you might have on the subject. Be it a change in the architecture, or a way to make the XSLT work inside XSJS.
Thanks and regards,
Christoff Schwan