xsl-list
[Top] [All Lists]

Formatting Flat XML data into Report

2004-02-13 15:11:56
Hi
I am getting the records from a database as result set (rows and columns) and the XML is not structured hierarchically.

I am using the Muenchian method to group them (by Client Name and Order #). How do I list all the "Security" and "Puposes" for a given order number and without repeating all the order fields like Order Number, title etc. for an order.

Also I do not know how many ?security Items? or ?Pupose? items will be there for a order number.

I am having problems formatting the report as listed below.

Client Name   order #    Title   Security  Purpose
---------------------------------------------------------------
XXX        1     AAA   Papers    AA
2 BBB Coins |<-- Multiple Security Items in the same order
                         Buildings        |<- Order # ... Purpose and Other 
fields
|<- should not be repeated

BBB       1     XZX    Building    CC       | <-- Multiple Purpose in the same 
Order
DD | <-- Order # ... Security and Other fields |<- should not be repeated

My XML looks like this
<client>
        <clientname>XXX</clientname>
        <OrderNumber>1</clientname>
        <title>AAA</title>
        <security>papers</security>
        <purpose>AA</purpose>
</client>
<client>
        <clientname>XXX</clientname>
        <OrderNumber>2</clientname>
        <title>BBB</title>
        <security>coins</security>
<purpose>AA</purpose> |<- Purpose is same for the same order and it should not be listed in the report
</client>
<client>
        <clientname>XXX</clientname>
        <OrderNumber>2</clientname>
        <title>BBB</title>
        <security>buildings</security>
        <purpose></purpose>
</client>
<client>
        <clientname>BBB</clientname>
        <OrderNumber>1</clientname>
        <title>XZX</title>
        <security>Buildings</security>
        <purpose>CC</purpose>
</client>
<client>
        <clientname>BBB</clientname>
        <OrderNumber>1</clientname>
        <title>XZX</title>
        <security>Buildings</security>
        <purpose>DD</purpose>
</client>

Thanks in advance
Ravi

_________________________________________________________________
Think Marriage! Think BharatMatrimony.com http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>
  • Formatting Flat XML data into Report, Ravi Nag <=