[Home] [By Thread] [By Date] [Recent Entries]
mIchael wolff wrote:
Hello, Setting a variable is something not possible in XSLT. When I walk through the code with XMLSpy debug, I see If you use XMLSpy Debug, you are not using Saxon anymore, but the internal XMLSpy parser, which is likely to do things differently, more so because it is still in the stages of adopting the xslt recommendation. Does anyone know what is wrong with this template? You have a 'current-group()' here. But you do not have a xsl:for-each-group instruction. The current-group function will return the empty sequence when there is not xsl:for-each-group and as a result, the xsl:for-each in your code has nothing to do, which results in the empty sequence for the variable 'Found'. The reason that the debugger does not step over it is probably because XMLSpy has optimized it away. If you could step over it using Saxon, you likely encountered the same behavior. For a processor, if it encounters your code, regardless the input, '$Found' will contain the empty sequence always. As a consequence, your line with '<xsl:if test="not(Found)"> ' is the first stop for the debugger (nothing else to do before that). Cheers, -- Abel Braaksma
|

Cart



