[Home] [By Thread] [By Date] [Recent Entries]
Here it is a 2.0 solution following the same idea as the 1.0 solution
but using a function and a call to that function.
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:g="http://www.oxygenxml.com/george">
<xsl:output indent="yes"/><xsl:function name="g:freeTimes"> <xsl:param name="time"/> <xsl:param name="cell"/> <xsl:sequence select=" if ($time/@time=$cell/@startTime) then (g:freeTimes( $time/following-sibling::time[@time=$cell/@endTime], $cell/following-sibling::cell[1]) ) else if ($time/following-sibling::*) then ($time, g:freeTimes($time/following-sibling::time[1], $cell)) else () "/> </xsl:function> <xsl:template match="/*"> <free><xsl:copy-of select="g:freeTimes(times/time[1], cells/cell[1])"/></free> </xsl:template> </xsl:stylesheet> Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Abel Braaksma wrote: Michael Kay wrote:This will almost certainly be easier in XSLT 2.0 than in 1.0. Would you be
|

Cart



