- From: <bugzilla@jessica.w3.org>
- Date: Sun, 15 Mar 2015 12:47:00 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28114 Abel Braaksma <abel.braaksma@xs4all.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abel.braaksma@xs4all.nl --- Comment #4 from Abel Braaksma <abel.braaksma@xs4all.nl> --- > So the kind of recursion described in comment #2 was not disallowed by this > rule. and from the spec: > A cycle exists if any attribute set is dependent on itself. and: > [ERR XTSE0720] [..] an xsl:attribute-set element directly or indirectly > references itself via the names contained in the use-attribute-sets attribute. I think that the example in comment#2 indirectly references itself (through $v) and that it is dependent on itself. So it is my understanding of the spec that this is disallowed. But I don't see how it can be a static-only error, as already explained in comment#1. > and if it's non-terminating, there's no guarantee it will be handled tidily. I can think of only one example (also very corner-casy) that might be terminating, based on the non-deterministic behavior of streams, something along those lines: <xsl:attribute-set name="a"> <xsl:attribute name="x"> <xsl:variable name="t" as="xs:time"> <xsl:stream href="urn:current-time"> <xsl:copy-of select="/time/@current-time" /> </xsl:stream> </xsl:variable> <xsl:variable name="test"> <xsl:if test="$t lt xs:time('10:23:00')"> <time xsl:use-attribute-sets="a"> <xsl:value-of select="$t"/> </time> </xsl:if> </xsl:variable> <xsl:value-of select="$test" /> </xsl:attribute> </xsl:attribute-set> This would loop recursively until the time is 10:23. Using this attribute-set would, if it were allowed, halt processing until that time is reached, though I am not sure whether the variable would yield a new value on each evaluation as a result of the xsl:stream instruction, I think that would be implementation defined (?). -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Sunday, 15 March 2015 12:47:03 UTC