![]() |
iPlanet Trustbase Payment Services 2.0 Beta Developer and Integration Guide |
Chapter 4 Creating Communicative Templates
Introduction
This help sheet describes the processing that takes place for presentment of XML documents relating to email acknowledgements and Biab Backend Messages. iTTM uses the XSLT translation technology see
from the Apache open source project found at http://xml.apache.org/. iTTM uses the Xalan XML parser for Java with the Xerces XML parser. See
http://xml.apache.org/xalan-j/index.html
http://xml.apache.org/xerces-j/
http://xml.apache.org/xerces2-j/javadocs/xerces2/overview-summary.html
We now discuss under the following main headings:
Email Acknowledgements
Method
iTPS uses two stylesheets to transform the Eleanor XML acknowledgement into the email that is sent to the subscriber. These stylesheets are found at
/opt/ittm/current/Config/Templates/en/Payment/subject.xsl
that creates the email subject and
/opt/ittm/current/Config/Templates/en/Payment/body.xsl
Standard Output response
Converting body.xsl produces an html output as follows
<td>1766631e9fdc51f1180002120448330</td>
<td>Payment Instruction Details Accepted</td>
Changing the Output
The following documents provide more information about XSLT
http://www.w3.org/Style/XSL/#learn
http://www.nwalsh.com/docs/tutorials/xsl/xsl/frames.html
In order to change the acknowledgement email messages you should adopt the following procedure.
Download XML parsing software as follows
Either Instant Saxon 6.2.2 command line XSL parser for Microsoft Windows.
http://users.iclway.co.uk/mhkay/saxon/
Or alternatively there is a Java packaged version.
http://xml.apache.org/crimson/index.html
The following illustrates how to run the Saxon tool. If no parameters are specified then the following output is provided:
Usage: saxon [options] source-doc style-doc {param=value}...
-a Use xml-stylesheet PI, not style-doc argument
-ds Use standard tree data structure
-dt Use tinytree data structure (default)
-o filename Send output to named file or directory
-m classname Use specified Emitter class for xsl:message output
-r classname Use specified URIResolver class
-t Display version and timing information
-TL classname Set a specific TraceListener
-u Names are URLs not filenames
-w0 Recover silently from recoverable errors
-w1 Report recoverable errors and continue (default)
-w2 Treat recoverable errors as fatal
-x classname Use specified SAX parser for source file
-y classname Use specified SAX parser for stylesheet
Make a backup copy of the standard iTPS XSL Templates
# cd /opt/ittm/Config/Templates/en/Payment
# cp subject.xsl subject_backup.xsl
iTTM will read the files from the file system each time they are required.
Here is a standard acknowledgement XML file to prototype with
<NIB id="NIB_92BB680DAD6437C1FBAFF16B300236D92C465B52_1" version="2.0">
<ContextInfo msggrpid="71DD6AEF563B6D4867418705178509948524BBB1" msgid="BFI05">
<LocalTime id="LocalTime_92BB680DAD6437C1FBAFF16B300236D92C465B52_1" time="20011105182855Z"/>
<LocalTime id="LocalTime_92BB680DAD6437C1FBAFF16B300236D92C465B52_2" time="20011105183621Z"/>
<Signature xmlns="http://www.w3.org/2000/02/xmldsig#">
<CanonicalizationMethod Algorithm="http://search.ietf.org/internet-drafts/draft-ietf-trade-hiroshi-dom-has h-03.txt">
<SignatureMethod Algorithm="http://www.w3.org/2000/02/xmldsig#rsa-sha1">
<Reference URI="#NIB_92BB680DAD6437C1FBAFF16B300236D92C465B52_1"><Transforms>
<Transform Algorithm="http://search.ietf.org/internet-drafts/draft-ietf-trade-hiroshi-dom-has h-03.txt"> </Transform>
<DigestMethod Algorithm="http://www.w3.org/2000/02/xmldsig#sha1">
<DigestValue>1RBeHeKJkjlQq+/E6LogWfLF8QM=</DigestValue>
<Reference URI="#ContentAcknowledgement_1576C34541070154DDE432BA7BF24D3B067BD99B_1">
<Transform Algorithm="http://search.ietf.org/internet-drafts/draft-ietf-trade-hiroshi-dom-has h-03.txt"></Transform>
<DigestMethod Algorithm="http://www.w3.org/2000/02/xmldsig#sha1"></DigestMethod>
<DigestValue>cnSVtgokSMyBaVPgd0HI/8LaDfU=</DigestValue>
<SignatureValue>DNkOnIoneexNzUqS9JhZV+ka1Yj7+fM8PtEFnkIcPDczg2ZNpFLgjlXthCAzbYf6q4 dRSYwXhYWbi/MJT2YC4XrhGtDTttEgcwyOz2mj1lCFsh77348RFvoeE351GWim9fHS3d4ozri9WJzpftVt 0hshVTiRBjvyZGex0l2zIU4=</SignatureValue>
<X509IssuerName>C=GB,O=iPlanet,OU=Payments Services,CN=Payments Root</X509IssuerName>
<X509SerialNumber>19</X509SerialNumber>
</Signature><ContentAcknowledgement id="ContentAcknowledgement_1576C34541070154DDE432BA7BF24D3B067BD99B_1">
<DocumentType>Acknowledgement</DocumentType>
<EleanorTransactionReference>1766631e9fdc51f1180002120448330</EleanorTransactionRe ference>
<AcknowledgementType>Service</AcknowledgementType>
<ReasonCode>00ND00</ReasonCode>
<ReasonText>Payment Instruction Details Accepted</ReasonText>
Prototype your new XSL file using Instant Saxon or similar Java XSL toolkit. To translate an xml file to html issue the following (this assumes Instant Saxon is installed into Windows c:\temp)
c:\temp\saxon acknowledgement.xml body.xsl > results.html
This file can then be viewed in a standard web browser.
Once you are satisfied with the HTML output replace the iTTM stylesheets Copy your new XSL to the/opt/ittm/Config/Templates/en/Payment with your example, ensure your stylesheets are called body.xsl and subject.xsll
Biab BackEnd Messages
In order to design your own Biab Back End Messages, follow the same procedure as mentioned in the previous section using the following default template:
/opt/iws6/itps-biab-deploy/css/pretty.xsl
Previous Contents DocHome Index Next
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.
Last Updated October 22, 2002