[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl grouping help
Hello, I just joined this group a minute ago, so I hope I'm sending this message to the right address. I'm a newbie and hence struggling :-( I need help with grouping. I have the following xml file structure <!-- Begin xml file --> <Client> <PersonID> <PersonIDNum>1290</PersonIDNum> </PersonID> <Program> <ClientHistory> <IncomeCashSource> <a>1</a> <b>1.1</b> <c> <d>1.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>2</a> <b>2.1</b> <c> <d>2.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>2</a> <b>2.1</b> <c> <d>2.3</d> </c> </IncomeCashSource> </ClientHistory> </Program> <Program> <ClientHistory> <IncomeCashSource> <a>1</a> <b>1.1</b> <c> <d>1.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>2</a> <b>2.1</b> <c> <d>2.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>3</a> <b>3.1</b> <c> <d>3.3</d> </c> </IncomeCashSource> </ClientHistory> </Program> </Client> <Client> <PersonID> <PersonIDNum>1291</PersonIDNum> </PersonID> <Program> <ClientHistory> <IncomeCashSource> <a>1</a> <b>1.1</b> <c> <d>1.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>2</a> <b>2.1</b> <c> <d>2.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>4</a> <b>4.1</b> <c> <d>4.3</d> </c> </IncomeCashSource> </ClientHistory> </Program> <Program> <ClientHistory> <IncomeCashSource> <a>1</a> <b>1.1</b> <c> <d>1.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>2</a> <b>2.1</b> <c> <d>2.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>3</a> <b>3.1</b> <c> <d>3.3</d> </c> </IncomeCashSource> </ClientHistory> </Program> </Client> <!-- End xml file --> I have to group similar 'IncomeCashSource' records (having values of <a>, <d> the same), within and across Programs for a single Client. The resulting file should look something like this <Clients> <Client> <Id>1290</Id> <IncomeCashSource> <a>1</a> <b>1.1</b> <c> <d>1.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>3</a> <b>3.1</b> <c> <d>3.3</d> </c> </IncomeCashSource> </Client> <Client> <Id>1291</Id> <IncomeCashSource> <a>1</a> <b>1.1</b> <c> <d>1.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>2</a> <b>2.1</b> <c> <d>2.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>4</a> <b>4.1</b> <c> <d>4.3</d> </c> </IncomeCashSource> <IncomeCashSource> <a>3</a> <b>3.1</b> <c> <d>3.3</d> </c> </IncomeCashSource> </Client> </Clients> Please help. I'm exhausted and frustrated after trying for 2 days and coming up with nothing ~Vanessa
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|