Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Getting context between nodes Getting context between nodesTo: NULL Date: 6/3/2005 9:44:00 AM Hello
I have a problem with my xsl-transforming because my xml-data is not well
structured. Unfortunately it cant be changed. My data looks like this:
<schedule>
<day>monday</day>
<job>dishes</job>
<job>clean</job>
<job>...</job>
<day>Tuesday</day>
<job>wipe</job>
<job>....</job>
<day>Wednesday</job>
<job>...</job>
....
</schedule>
Is there a way to pick jobs, for example monday from between the day-tags
monday & tuesday. Ive tried this
<xsl:for-each select="schedule/day">
<xsl:value-of select="."/>
<xsl:if test="name(following-sibling::*[1])='job'">
<xsl:for-each select="following::day">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:for-each>
But this goes over the next day tag and for monday it picks the jobs for the
whole week.
Iva looked up Generate-id(), but i couldnt really put my finger on how to
use it on this case. Could somebody please help me?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
