W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2003

XPath 2.0 little question on draft (`for' statement)

From: Bernard van Gastel <bernardg@sci.kun.nl>
Date: Wed, 19 Nov 2003 16:21:21 +0100 (MET)
To: public-qt-comments@w3.org
Cc: is1@bitpowder.com
Message-ID: <Pine.GSO.4.44.0311191612150.27746-100000@studs2.sci.kun.nl>

Hello XPath 2.0 Working Group,

In Section 3.7 of the XPath 2.0 draft of 22 August 2003 the following
example is included.

	for $a in distinct-values(//author)
	return ($a,
        	for $b in //book[author = $a]
        	return $b/title)

I think it can be replaced by the following sniplet.

	for $a in distinct-values(//author)
	return ($a, //book[author = $a]/title)

Is this correct? Why is chosen for the first version (if the second
version is correct) instead of the second? Thank you in advance,

	Bernard van Gastel
	- Student Computer Science,
		University of Nijmegen,
		The Netherlands
Received on Wednesday, 19 November 2003 10:56:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:28 GMT