OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Advice Needed: What is the best way?

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: Advice Needed: What is the best way?
  • From: "Thomson, Alisa" <Thomson@fhlb-of.com>
  • Date: Thu, 28 Oct 2004 14:26:15 -0400
  • Thread-index: AcS9G5wrBQxsJXsHSK2w5d63s+Va/Q==
  • Thread-topic: Advice Needed: What is the best way?

Title: Advice Needed: What is the best way?

I am currently writing a Java application that create a DOM document and then (using xsl-fo) convert that to a PDF document.  The end user

had a request and I'm not sure of the best way to go about it.  I apologize for the long post. Below is how the DOM document would be represented:

<BondTermSheet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <TSData>
            <BondTermSheetID>3</BondTermSheetID>
            <TradeDateTime>2004-09-14T04:03:23</TradeDateTime>
            <Amount>2000.0000</Amount>
            <MaturityDate>2008-09-14T00:00:00</MaturityDate>
        <FirstPayDate>2004-10-08T00:00:00</FirstPayDate>
            <PayFrequency>Semi-Annual</PayFrequency>
            <CouponRow>
           <BeginDate>10/08/2004</BeginDate>
           <EndDate>10/08/2005</EndDate>
               <CouponInfo>
                  <Rate>5.0</Rate>
                  <Reset>Monthly</Reset>
                  <ReferenceRate>LIBOR</ReferenceRate>
                  <Cap>3.8</Cap>
                  <Floor>0.0</Floor>
          </CouponInfo>
        </CouponRow>
        <CouponRow>
          <BeginDate>10/08/2005</BeginDate>
          <EndDate>10/08/2006</EndDate>
              <CouponInfo>
                  <Rate>5.5</Rate>
                  <Reset>Monthly</Reset>
                  <ReferenceRate>LIBOR</ReferenceRate>
                  <Cap>4.2</Cap>
                  <Floor>0.0</Floor>
                </CouponInfo>
        </CouponRow>
    </TSData>
</BondTermSheet>

The current output is:

        Trade  Date:                September  14, 2004  04:03
        Total Amount:             $2,000
        Maturity Date:            September   14, 2008
        FirstPay  Date:           September   10, 2004
        Pay  Frequency:           Semi-Annual
        Coupon   And  Date  Ranges:
        Beginning  10/08/2004  through  10/08/2005                    Rate:  5.0
                                                                      Reset:  Monthly
                                                                      Reference Rate:  LIBOR
                                                                      Cap:  3.8
                                                                      Floor:  0.0

        Beginning  10/08/2005  through  10/08/2006                    Rate:  5.5
                                                                      Reset:  Monthly
                                                                      Reference Rate:  LIBOR
                                                                      Cap:  4.2
                                                                      Floor:  0.0

However, the user has requested that in the section labelled Coupon and Date Ranges, there should be one range that covers the entire length

of time where items that do not change over time are listed.  All other items would be separated as above.  For instance,

        Coupon   And  Date  Ranges:
        Beginning  10/08/2004  through  10/08/2006                    Reset:  Monthly
                                                                      Reference Rate:  LIBOR
                                                                      Floor:  0.0
                                                                     
        Beginning  10/08/2004  through  10/08/2005                    Rate:  5.0
                                                                      Cap:  3.8

        Beginning  10/08/2005  through  10/08/2006                    Rate:  5.5
                                                                      Cap:  4.2

Unfortunately, any of the items can change over time.  I wanted to get some opinions if the easiest way to handle this is just to create another

parent element to encapsulate the repeating information like <RepeatingCouponRow> and handle the heavy-lifting on the Java side.  Is there a

way in XSL, that I can analyze the data and create this optional output?

Thanks in advance for any suggestions.

Ci-Ci Thomson





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS