[Bug 3771] [FS] technical: interleaved with empty text nodes

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3771


jmdyck@ibiblio.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED




------- Comment #7 from jmdyck@ibiblio.org  2008-03-10 06:22 -------
Moreover, the other case of interleaving empty text nodes, in the normalization
of direct attribute constructors (4.7.1.1), doesn't work. Consider the direct
attribute constructor:
    a="{4}{2}"
which is currently normalized to
    attribute a { fs:item-sequence-to-untypedAtomic(( (4), text {""}, (2) )) }
At evaluation time, the value passed to the function is
        4, text {""}, 2
Section 7.1.7 says that it applies the rules in XQuery 3.7.3.2, so:
(1) Atomize the sequence, yielding:
        4, "", 2
(2) Each of these atomic values is cast into a string:
        "4", "", "2"
(3) Merge these strings by concatenation with a single space between each pair:
        "4  2"
    (A space between "4" and "", and another between "" and "2".)
    The resulting string becomes the string-value of the new attribute node.

But in fact the value of the attribute is "42".

Received on Monday, 10 March 2008 06:22:19 UTC