Previous     Contents     DocHome     Index     Next     
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

http://www.w3.org/TR/xslt

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

  • Biab BackEnd Messages


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

creates the body.


Standard Output response

Converting body.xsl produces an html output as follows

<html>

<head>

<title/>

</head>

<body>

<p>

<table>

<tr>

<td>

<i>Transaction Reference:</i>

</td>

<td>1766631e9fdc51f1180002120448330</td>

</tr>

<tr>

<td>

<i>Status:</i>

</td>

<td>SUCCESS</td>

</tr>

<tr>

<td>

<i>Reason Text:</i>

</td>

<td>Payment Instruction Details Accepted</td>

</tr>

</table>

</p>

</body>

</html>


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.

  1. Download XML parsing software as follows

    1. Either Instant Saxon 6.2.2 command line XSL parser for Microsoft Windows.

      http://users.iclway.co.uk/mhkay/saxon/

    2. Or alternatively there is a Java packaged version.

      http://xml.apache.org/crimson/index.html

  2. The following illustrates how to run the Saxon tool. If no parameters are specified then the following output is provided:

c:\temp>saxon

No source file name

SAXON 6.2.2 from Michael Kay

Usage: saxon [options] source-doc style-doc {param=value}...

Options:

-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

-T Set standard TraceListener

-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

-? Display this message

  1. Make a backup copy of the standard iTPS XSL Templates

    # cd /opt/ittm/Config/Templates/en/Payment

    # cp subject.xsl subject_backup.xsl

    # cp body.xsl body_backup.xsl

    iTTM will read the files from the file system each time they are required.

  2. Here is a standard acknowledgement XML file to prototype with

    <Acknowledgement>

    <NIB id="NIB_92BB680DAD6437C1FBAFF16B300236D92C465B52_1" version="2.0">

    <ContextInfo msggrpid="71DD6AEF563B6D4867418705178509948524BBB1" msgid="BFI05">

    </ContextInfo>

    <StartTime>

    <LocalTime id="LocalTime_92BB680DAD6437C1FBAFF16B300236D92C465B52_1" time="20011105182855Z"/>

    </StartTime>

    <MsgTime>

    <LocalTime id="LocalTime_92BB680DAD6437C1FBAFF16B300236D92C465B52_2" time="20011105183621Z"/>

    </MsgTime>

    </NIB>

    <Signature xmlns="http://www.w3.org/2000/02/xmldsig#">

       <SignedInfo>

          <CanonicalizationMethod Algorithm="http://search.ietf.org/internet-drafts/draft-ietf-trade-hiroshi-dom-has h-03.txt">

          </CanonicalizationMethod>

          <SignatureMethod Algorithm="http://www.w3.org/2000/02/xmldsig#rsa-sha1">

          </SignatureMethod>

       <Reference URI="#NIB_92BB680DAD6437C1FBAFF16B300236D92C465B52_1"><Transforms>

          <Transform Algorithm="http://search.ietf.org/internet-drafts/draft-ietf-trade-hiroshi-dom-has h-03.txt">      </Transform>

          </Transforms>

          <DigestMethod Algorithm="http://www.w3.org/2000/02/xmldsig#sha1">

          </DigestMethod>

          <DigestValue>1RBeHeKJkjlQq+/E6LogWfLF8QM=</DigestValue>

          </Reference>

          <Reference URI="#ContentAcknowledgement_1576C34541070154DDE432BA7BF24D3B067BD99B_1">

          <Transforms>

             <Transform Algorithm="http://search.ietf.org/internet-drafts/draft-ietf-trade-hiroshi-dom-has h-03.txt"></Transform>

          </Transforms>

          <DigestMethod Algorithm="http://www.w3.org/2000/02/xmldsig#sha1"></DigestMethod>

          <DigestValue>cnSVtgokSMyBaVPgd0HI/8LaDfU=</DigestValue>

       </Reference>

    </SignedInfo>

    <SignatureValue>DNkOnIoneexNzUqS9JhZV+ka1Yj7+fM8PtEFnkIcPDczg2ZNpFLgjlXthCAzbYf6q4 dRSYwXhYWbi/MJT2YC4XrhGtDTttEgcwyOz2mj1lCFsh77348RFvoeE351GWim9fHS3d4ozri9WJzpftVt 0hshVTiRBjvyZGex0l2zIU4=</SignatureValue>

       <KeyInfo>

          <X509Data>

             <X509IssuerSerial>

                <X509IssuerName>C=GB,O=iPlanet,OU=Payments Services,CN=Payments Root</X509IssuerName>

                <X509SerialNumber>19</X509SerialNumber>

             </X509IssuerSerial>

          </X509Data>

       </KeyInfo>

       </Signature><ContentAcknowledgement id="ContentAcknowledgement_1576C34541070154DDE432BA7BF24D3B067BD99B_1">

       <Header xml:lang="en">

          <Product>xPx</Product>

          <DocumentType>Acknowledgement</DocumentType>

          <Version>1.0</Version>

       </Header>

       <References>

        <EleanorTransactionReference>1766631e9fdc51f1180002120448330</EleanorTransactionRe ference>

    </References>

       <AcknowledgementData>

       <AcknowledgementType>Service</AcknowledgementType>

          <Status>SUCCESS</Status>

          <ReasonCode>00ND00</ReasonCode>

          <ReasonText>Payment Instruction Details Accepted</ReasonText>

       </AcknowledgementData>

    </ContentAcknowledgement>

    </Acknowledgement>

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

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