RE: MS-FO-LC1-036: string-join example is wrong

> 
> The example is wrong, however, because it uses the expression 
> "name(.)" when it should use "name($n)". The current example 
> would return "section/section/section" since "name(.)" always 
> returns "section". The corrected example is:
> 
>   fn:string-join(for $n in ancestor-or-self::* return name($n), '/')
> 

If we can't have a "for" expression that binds the context item, I really do
think that as a minimum, a "for" expression should unbind ".", so that this
all-too-common error gets detected.

Michael Kay

Received on Tuesday, 1 July 2003 13:51:06 UTC