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

Finding unique columns for building a table ...

Subject: Finding unique columns for building a table ...
From: "Richard Pugh" <rpugh@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 3 Jun 2005 21:38:15 +0100
rich pugh
Hi all - I've just started using XSLT, so apologies if this is a basic
question.  
I would RTFM but my colleague has TFM so I can't at the moment!  

Anyway, the question:-

I have an XML document that looks like this ...

<?xml version="1.0" encoding="UTF-8"?>
<myRoot>
 <myResults>
  <myOutput Dose="1">
   <timePoint time="1">
    <Value name="P50" Label="Median">1924.836</Value>
    <Value name="P2.5" Label="2.5%">1194.928</Value>
    <Value name="P97.5" Label="97.5%">2598.446</Value>
   </timePoint>
   <timePoint time="2">
    <Value name="P50" Label="Median">1851.636</Value>
    <Value name="P2.5" Label="2.5%">1723.220</Value>
    <Value name="P97.5" Label="97.5%">2024.470</Value>
   </timePoint>
   ...

What I want to do is build a table using 2/3 predefined columns and all
columns I have "value" for at each timePoint (eg. P2.5, P50 and P97.5 in
this case).  So, I want my output to look like this:-

Dose	Time	Median	2.5%		97.5%
1	1	1924.836	1194.928	2598.446
1	2	1851.636	1723.220	2024.470
.

I can see how I could iterate through and build the "rows" of the table
output, but I can't see how I figure out how many columns of values there
are in the first place.  Does anyone have a good approach to finding all
columns (P50, P2.5 and P97.5 in this case), storing that information, then
using that to reference values when iterating through rows?

Many thanks for any help .
Rich.

Current Thread

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
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.