Re: Review of RQ23 section 11, Testing Values

On Wed, Feb 09, 2005 at 05:33:54PM +0000, Steve Harris wrote:
> 
> Hopefully completes action from telecon of 2005-02-08.
> 
> As of revision 1.202
> 
> Things marked Minor: just struck me as odd, others are wrong and should be
> fixed or explained.
> 
> General
> 
> It's allready been noted, but its particularly clear in this part of the
> document; there are a clutch of things that look function-like, eg
> FUNC(), fn:func() and &fn:func(). I would have thought these could be
> reduced to one or two forms.
> 
> Section 11.1
> 
> Minor (maybe): I recommend against specifying that operators can work on
> both float and double. Universally prmoting floats to doubles in the query
> language is far less confusing. It avoids problems such as
> 
> _:a  rdf:value	"3" .
> 
> SELECT ?x
>  WHERE (?x rdf:value ?val)
>    AND xsd:float(?x) == 3.0
> 
> which produces no matches in IEEE-754 compliant implementations, though it
> looks cromulent.

some comments repeated from IRC:

XPath takes a different approach. it specifies a set of ops and functions that take numeric inputs

2005-02-11T11:19:23Z <ericP> [[
for instance, '==' binds to any of
 op:numeric-equals(xsd:integer, xsd:integer),
 op:numeric-equals(xsd:float, xsd:float),
 op:numeric-equals(xsd:decimal, xsd:decimal),
 op:numeric-equals(xsd:double, xsd:double)
]]
2005-02-11T11:21:18Z <SteveH> [[
I actually store that as the double 0.1, but not everyone will causing
general excitement
]]
2005-02-11T11:22:03Z <ericP> [[
i'm just trying to figure how to DTRT (Do The Right Thing).
]]

> Section 11.1.1
> 
> "This is accomplished by promoting the arguments to the lowest common
> type." should that be "highest common type"? If not, list order should be
> reversed.

Aha, "common" is the problem. will think about wording.

> Table 11.1
> 
> Minor: == can be applied to URIs and numeric arguments, but not strings or
> datetimes. Seems odd.

I added == for dateTimes.

In a bunch of langs, string or structure comparison is syntactically
separated. When tieing ops back to the grammar, that was the binding
that made sense. The grammar has RDQL origins.

> Section 11.2.1.*
> 
> Minor: sections are titled 11.2.1.* sop:interCapped, but sop: is not used
> in examples and the keywords are in CAPS

I will strike the style that i was using. Wasn't a good re-use.
.token { color: #3f3f5f; font-size: 88%; text-transform: uppercase; }


more in a few hours...


> Minor: redundant {}'s round stement patterns.
> 
> Section 11.2.1.2
> 
> Typo in query, I think it should be something like:
> 
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> SELECT ?name
> WHERE  ( ?x foaf:name ?name )
>        OPTIONAL ( ?x foaf:mbox ?mbox )
>    AND BOUND(?mbox)
> 
> Ditto for 2nd query. There a load of extra paranes and braces in there
> that dont balance.
> 
> Section 11.2.1.6
> 
> Results should be
> 	"Alice"  |  <alice@work.example>
> 
> Section 11.2.1.7
> 
> Typo. Query is
> 
> 	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> 	SELECT ?name1
> 	 WHERE { ( ?x foaf:name  ?name ) }
> 	   AND LANG(?mbox) EQ "ES"
> 
> should probably be
> 
> 	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> 	SELECT ?name ?mbox
> 	 WHERE ( ?x foaf:name ?name )
> 	       ( ?x foaf:mbox ?mbox )
> 	   AND LANG(?name) EQ "ES"
> 
> to match the results, and because ?mbox cant have a LANG.
> 
> Table 11.2
> 
> Casting table has some odd-looking results in it, eg. casting r:Literals
> to xs:double is down as No, but xs:String to xs:double is down as Maybe.
> Ditto for str->URI and ltrl->URI.
> 
> Section 11.3
> 
> Syntax is given as
> 	&qname(?var or constant, ?var or constant , ...)
> but the example is
> 	fn:matches(STR(?mbox), "@work.example$")
> ie. no & and fn: is not declared, STR(?mbox) is neither a ?var or constant
> AFAIK.
> 
> fn:matches takes a pattern for its 2nd argument, so I think this should be
> /@work.example$/ to match other examples.
> 
> --------------------------------------------------------

-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Friday, 11 February 2005 16:02:02 UTC