mayamanako
Technical User
Hi guys,
I have an XML code below
the XML code
how do I format it from
to this? Thanks for any inputs.
my XSL is like this:
I have an XML code below
the XML code
Code:
.
.
.
<s:timesSessionType sessionType="surgery">
- <s:daysOfWeek>
- <s:dayOfWeek>
<s:dayName>Sunday</s:dayName>
- <s:timesSessions>
<s:timesSession>Closed</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
- <s:dayOfWeek>
<s:dayName>Monday</s:dayName>
- <s:timesSessions>
- <s:timesSession>
<s:fromTime>08:00</s:fromTime>
<s:toTime>20:30</s:toTime>
</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
- <s:dayOfWeek>
<s:dayName>Tuesday</s:dayName>
- <s:timesSessions>
- <s:timesSession>
<s:fromTime>08:00</s:fromTime>
<s:toTime>18:30</s:toTime>
</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
- <s:dayOfWeek>
<s:dayName>Wednesday</s:dayName>
- <s:timesSessions>
- <s:timesSession>
<s:fromTime>08:00</s:fromTime>
<s:toTime>20:30</s:toTime>
</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
- <s:dayOfWeek>
<s:dayName>Thursday</s:dayName>
- <s:timesSessions>
- <s:timesSession>
<s:fromTime>08:00</s:fromTime>
<s:toTime>18:30</s:toTime>
</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
- <s:dayOfWeek>
<s:dayName>Friday</s:dayName>
- <s:timesSessions>
- <s:timesSession>
<s:fromTime>08:00</s:fromTime>
<s:toTime>18:30</s:toTime>
</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
- <s:dayOfWeek>
<s:dayName>Saturday</s:dayName>
- <s:timesSessions>
<s:timesSession>Closed</s:timesSession>
</s:timesSessions>
</s:dayOfWeek>
</s:daysOfWeek>
</s:timesSessionType>
.
.
.
how do I format it from
Code:
SundayClosed
Monday08:0020:30
Tuesday08:0018:30
Wednesday08:0020:30
Thursday08:0018:30
Friday08:0018:30
SaturdayClosed
to this? Thanks for any inputs.
Code:
Sunday: Closed
Monday: 08:00-20:30
Tuesday: 08:00-18:30
Wednesday: 08:00-20:30
Thursday: 08:00-18:30
Friday: 08:00-18:30
Saturday: Closed
my XSL is like this:
Code:
<xsl:for-each select="./a:content/s:overview/s:openingTimes/s:timesSessionTypes/s:timesSessionType[@sessionType='surgery']/s:daysOfWeek/s:dayOfWeek">
<xsl:value-of select="."/><br/>
</xsl:for-each>