This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The query fn:count(fn:string(fn:prefix-from-QName(xs:QName("name")))) wants to check that prefix-from-QName returns an empty sequence; but creating a string from an empty sequence returns a string of zero length, and fn:count will return 1 (as its argument is a sequence of 1 empty string). In order to get the desired 0 value, the query should either be fn:string-length(fn:string(fn:prefix-from-QName(xs:QName("name"))) or fn:count(fn:prefix-from-QName(xs:QName("name")))
Alberto: You are correct. re-wrote the query to use your second suggestion of "fn:count(fn:prefix-from-QName(xs:QName("name")))" Please close the bug if in agreement. Thanks, Carmelo
Hi Carmelo, the same problem should appear also in fn-prefix-from-qname-4, where the only difference is that xs:string is used instead of fn:string
fn-prefix-from-qname-3 has been changed, but the expected result is 1, while the correct one is 0 (prefix-from-QName returns an empty sequence because the prefix is missing). fn-prefix-from-qname-4 has not been updated, and it still contains fn:count(xs:string(fn:prefix-from-QName(xs:QName("name")))) As changing it by removing xs:string would make it identical with fn-prefix-from-qname-3, it could be changed into fn:string-length(xs:string(fn:prefix-from-QName(xs:QName("name")))
Alberto: Correct, I did change the expected results for fn-prefix-from-qname-3 and changed fn-prefix-from-qname-4 as suggested. I did notice though that these tests are under "Expressions" rather than under "Functions". I will try to make that move later for the 1.0 version. Please close the bug if in agreement. Thanks, carmelo