[Bug 6538] [FS] Inconsistent following-sibling behaviour of attribute nodes


Michael Dyck <jmdyck@ibiblio.org> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED
            Summary|Inconsistent following-     |[FS] Inconsistent following-
                   |sibling behaviour of        |sibling behaviour of
                   |attribute nodes             |attribute nodes

--- Comment #1 from Michael Dyck <jmdyck@ibiblio.org>  2009-02-08 07:03:53 ---
I agree, FS's normalization rule for following-sibling is incorrect.
I propose we fix it by adding a 'where' clause to the right-hand side:

        let $e := .
        where fn:not($e/self::attribute())
        return $e/parent::node()/child:: NodeTest [.>>$e]

And thanks for the heads-up re the following:: axis, although I believe
the danger is not that it would mistakenly yield an empty sequence,
but rather that it would yield a sequence that is missing the descendants 
of the attribute's parent. We could add them in explicitly, but I think
that would be fairly ugly. Instead, I suggest we go back to the definition:

    the 'following' axis contains all nodes that are descendants
    of the root of the tree in which the context node is found,
    are not descendants of the context node, and occur after
    the context node in document order

and express it thusly:

    [ following:: NodeTest ]_Axis
        let $e := .
            fn:root() / descendant:: NodeTest [. >> $e]
            $e / descendant::node()

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Sunday, 8 February 2009 07:04:03 UTC