W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2015

[Bug 28114] [xslt 3.0] Cycles in attribute sets

From: <bugzilla@jessica.w3.org>
Date: Sun, 15 Mar 2015 12:47:00 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28114-523-0exNwumbxf@http.www.w3.org/Bugs/Public/>

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.

> [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

> 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:variable name="test">
      <xsl:if test="$t lt xs:time('10:23:00')">
        <time xsl:use-attribute-sets="a">
          <xsl:value-of select="$t"/>

    <xsl:value-of select="$test" />

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:53 UTC