- From: Frank Yung-Fong Tang <franktang@gmail.com>
- Date: Tue, 8 Mar 2005 11:30:58 -0500
- To: public-qt-comments@w3.org
Question 1: In http://www.w3.org/TR/xquery-use-cases/#xmp-data the text inside the <price> of the first <book> is <price> 65.95</price> instead of <price>65.95</price> Notice the space in front of '6' but the Expected Result: of 1.1.9.5 Q5 is <books-with-prices> <book-with-prices> <title>TCP/IP Illustrated</title> <price-bstore2>65.95</price-bstore2> <price-bstore1>65.95</price-bstore1> </book-with-prices> Well the "$a/price/text()" remove the white space before '6'? or is that a mistake in the sample data? Question 2: About 1.1.9.4 Q4 distinct-values($a/last) distinct-values($a[last=$last]/first) The distinct-values function defined in http://www.w3.org/TR/xpath-functions/#func-distinct-values take xdt:anyAtomicType But $a/last or $a[last=$last]/first are not atomic type, right? should these two lines be distinct-values($a/last/text()) distinct-values($a[last=$last]/first/text()) instead? or the XQuery will automatically convert it? also, how about where some $ba in $b/author satisfies ($ba/last = $last and $ba/first=$first) since $last is return by distinct-values($a/last) eariler, the value of $last must be an atomicType. but $ba/last is not a atomicType. How does the comparison perform in this case? Is there a implicit conversion defined in XQuery to make that comparison happen? Should these two line change to where some $ba in $b/author satisfies ($ba/last/text() = $last and $ba/first/text()=$first) instead? -- Frank Yung-Fong Tang 譚永鋒 Šýšţém Årçĥîţéçţ
Received on Tuesday, 8 March 2005 16:35:14 UTC