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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Xml to HTML using XSL kinda tricky

[ Lists Home | Date Index | Thread Index ]

XSLT and XPath questions would be better posted to the following list:

   http://www.mulberrytech.com/xsl/xsl-list

There are a number of subscribers who would enthusiastically respond to 
such questions.

There is also an *excellent* FAQ at:

   http://www.dpawson.co.uk

At 2002-10-30 12:02 -0800, Nischal Muthana wrote:
>I have an Xml file like the following.
>...
>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)

You will need it in XML in order to bring into XSLT ... all inputs to XSLT 
are node trees, usually derived from XML documents.

>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
>...
>Any help in how to go about will be greatly
>appreciated.

See the FAQ regarding grouping algorithms and use the customer file as the 
basis of your transformation.

The headings that you need can be derived from the XML you create for the 
product information.

Because of the totalling requirements, you may find it easier to do two 
passes, creating an intermediate file and then totalling from the 
intermediate file.

Given the early stage of your data and requirements, this should be enough 
to get you started.

I hope this helps.

.................... Ken


--
G. Ken Holman               mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.        http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0  +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                     Definitive XSLT and XPath
ISBN 0-13-140374-5                             Definitive XSL-FO
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1             Practical Formatting Using XSL-FO
Next public training:          2002-12-08,2003-02-03,06,03-03,06





 

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

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