[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Advice Needed: What is the best way?

  • To: <xml-dev@l...>
  • Subject: Advice Needed: What is the best way?
  • From: "Thomson, Alisa" <Thomson@f...>
  • Date: Thu, 28 Oct 2004 14:26:15 -0400
  • Thread-index: AcS9G5wrBQxsJXsHSK2w5d63s+Va/Q==
  • Thread-topic: Advice Needed: What is the best way?

libor index
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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.