Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format xml grouping by date??????

Status
Not open for further replies.

dallasweb

Programmer
Jan 4, 2001
45
0
0
US
Hello all,

Here is my xml doc and desired output. I'm pretty new to using xslt and this has really stumped me. So any help is appreciated.

XML:
<VitalSignsComponent>
<patient_info>
<vitals>
<type>bp</type>
<date>04/14/2003</date>
<time>13:15:00</time>
<sys_value>157</sys_value>
<dia_value>99</dia_value>
<mean_value>118</mean_value>
</vitals>
<vitals>
<type>bp</type>
<date>04/14/2003</date>
<time>13:30:00</time>
<sys_value>145</sys_value>
<dia_value>94</dia_value>
<mean_value>111</mean_value>
</vitals>
<vitals>
<type>bp</type>
<date>04/14/2003</date>
<time>13:45:00</time>
<sys_value>150</sys_value>
<dia_value>89</dia_value>
<mean_value>109</mean_value>
</vitals>
<vitals>
<type>hr</type>
<date>04/14/2003</date>
<time>13:15:00</time>
<value>63</value>
</vitals>
<vitals>
<type>hr</type>
<date>04/14/2003</date>
<time>13:30:00</time>
<value>77</value>
</vitals>
<vitals>
<type>hr</type>
<date>04/14/2003</date>
<time>13:45:00</time>
<value>78</value>
</vitals>
<vitals>
<type>temp</type>
<date>04/14/2003</date>
<time>13:15:00</time>
<c_value> 36.6</c_value>
<f_value> 97.9</f_value>
</vitals>

<vitals>
<type>o2</type>
<date>04/14/2003</date>
<time>13:15:00</time>
<value>98</value>
</vitals>
<vitals>
<type>resp</type>
<date>04/14/2003</date>
<time>13:15:00</time>
<value>20</value>
</vitals>
</patient_info>
<utility>
<hours>12</hours>
</utility>
</VitalSignsComponent>

Output:
<table cellspacing=&quot;2&quot; cellpadding=&quot;2&quot; border=&quot;1&quot;>
<tr>
<td> </td>
<td>04/14/2003 - 13:15:00</td>
<td>04/14/2003 - 13:30:00</td>
<td>04/14/2003 - 13:45:00</td>
</tr>
<tr>
<td>BP</td>
<td>157/99 118</td>
<td>145/94 111</td>
<td>150/89 109</td>
</tr>
<tr>
<td>HR</td>
<td>63</td>
<td>77</td>
<td>78</td>
</tr>
<tr>
<td>RESP</td>
<td> </td>
<td> </td>
<td>20</td>
</tr>
<tr>
<td>o2</td>
<td>98</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Temp</td>
<td>97.9f 36.6c</td>
<td> </td>
<td> </td>
</tr>
</table>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top