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

Xml to HTML using XSL kinda tricky


xml to html using xsl
Hi All

I have an Xml file like the following.

<CustomerList>
  <Customer>
    <CustomerInfo>
      <CustomerID>NNNWWW</CustomerID>
    </CustomerInfo>
    <ProductList>
      <Product>
        <ProductID>1000</ProductID>
      </Product>
    </ProductList>
  </Customer>
  <Customer>
    <CustomerInfo>
      <CustomerID>NNNWWW</CustomerID>
    </CustomerInfo>
    <Product>
      <ProductID>1001</ProductID>
    </Product>
  <Customer>
</CustomerList>

What I am tryin to do is:

1. Group all the CustomerID's
(/CustomerList/Customer/CustomerInfo/CustomerID's)
present in the XML file and display a column of Unique
CustomerID's. 

I have a criteria table for the products like the
following

ProductIDs 
1000,1001,1005,1100 -- Groceries
2000,2001,2005,2300 -- Food
3000,3004,6000,5000 -- Books

(I wouldnt mind having this as an Xml)

2. Then take all the Product ID's(
/CustomerList/Customer/Product/ProductID), for each of
the CustomerID that is grouped above, map against the
above Criteria table and find the count of each of the
product categories that a particular CustomerID has
bought.

The resulting table should be like the following

CustomerID   Groceries   Food    Books    Total
NNNWWW          2          0      1         3
NNNPPP          0          3      2         5
NNNYYY          2          2      2         6

Summary Total   4          5      5         15

Any help in how to go about will be greatly
appreciated.

Thanks
Nischal

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

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.