Re: [XQuery] use of distinct-values in chapter 3.8.4

Hi Timo,
Thanks for your comments. You are correct in every case. I have made the 
corrections you suggest and they will appear in the next working draft.
Best regards,
--Don Chamberlin




Timo Boehme <boehme@informatik.uni-leipzig.de> 
Sent by: public-qt-comments-request@w3.org
02/05/2004 08:39 AM

To
public-qt-comments@w3.org
cc

Subject
[XQuery] use of distinct-values in chapter 3.8.4







In the XQuery Working Draft (12 November 2003) in chapter 3.8.4 (Example)
the function distinct-values is used to eliminate duplicate authors.

However the line reads

  for $a in fn:distinct-values($books)//author

Since the function returns atomic type values this seems to be broken
(//author on atomic values). So I think the right parenthesis has to be
after author.

Beside this the following lines contains a second error

  <name>
    { $a/text() }
  </name>

Comparing other examples I have the understanding that distinct-values
not only convert nodes to atomic type values (with dm:typed-value ?) for
comparison but to return these atomic values as well. Therefor the
'/text()' has to be removed since $a doesn't represent the author element
node but the text content.

Comment:
I find the last mentioned fact that we will get atomic type values even if
we provide a node sequence is not quite obvious. So a short note or an
additional example in the 'Functions and Operators' document would be
helpful.


Regards
Timo

Received on Thursday, 5 February 2004 17:37:37 UTC