- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Thu, 5 May 2016 04:18:07 -0400
- To: Arnaud Le Hors <lehors@us.ibm.com>
- Cc: public-data-shapes-wg@w3.org
ISSUE-158 - sure, raise it, but if you want to dispose of it, -.5 to validating lexical forms when matching triples. Recall that SPARQL cares about datatype in 5 distinct ways: 1 matching terms - examples: 1 matches 1 01 matches 01 1 does not match 01 "a"^^xs:integer in principle matches "a"^^xs:integer I don't recall if there are tests for the latter as there were implementations which validated lexical forms on input of both data and queries. Passing this test would be a burden. 2 numeric comparison - examples: 1 = 1 = 01 = 1.0 = .1E1 FILTER("a"^^xs:integer = "a"^^xs:integer) is a type error FILTER("a"^^xs:integer < "a"^^xs:integer) is a type error 3 boolean value of expression - examples: FILTER(0) fails FILTER(1) passes FILTER("a"^^xs:integer) is a type error (so fails) 4 casting - examples: xs:integer("1") is 1 xs:integer("a") is a type error 5 non-casing functions - examples datatype("a"^^xs:integer) is xs:integer BIND("1"^^<http://www.w3.org/2001/XMLSchema#integer> AS ?x) Note that in graph patterns and filters, term construction "a"^^xs:integer is not a type error. ISSUE-123: DirectType syntax Last week, I asked and didn't understand the answer to how seeing ex:MyShape sh:property [ sh:predicate dc:author ; sh:classOrDt an:author ] . would tell an interface to prompt for a literal like "Bob Smith"^^an:author or node with a type [ rdf:type an:author ] +1 to Holger's proposal to implement direct type as a property constraint on rdf:type ISSUE-135: and/or syntactic sugar In principle, I like simplicity but I'm unsure how to go there. In ShEx, ANDs, ORs and triple constraints are composed into triple expressions. A shape has a triple expression (likely an AND), a CLOSEDness flag, and a list of open properties (like QCRs). A SHACL could follow this pattern a la clin:AdmissionForm a sh:shape; sh:closed true; sh:expr [ a sh:And ; sh:exprs ( [ sh:predicate clin:givenName ; sh:nodeKind sh:Literal ] [ sh:predicate clin:familyName ; sh:nodeKind sh:Literal ] ) ]. I've made a proposal to that effect: https://www.w3.org/2014/data-shapes/wiki/Proposals#ISSUE-135:_and.2For_syntactic_sugar ISSUE-78: sh:abstract no useful opinion ISSUE-141: Mixed ranges ShEx solves this with value expressions, e.g. sh:property [ sh:predicate schema:address ; sh:valueExpr [ a sh:ValueAnd ( [ sh:datatype xsd:string ] [ sh:predicate schema:address ; sh:class schema:PostalAddress ] ) ] ] . for examples, see the ShExC https://github.com/shexSpec/shexTest/blob/master/schemas/1val1vExprOR3.shex or JSON https://github.com/shexSpec/shexTest/blob/master/schemas/1val1vExprOR3.json -- -ericP office: +1.617.599.3509 mobile: +33.6.80.80.35.59 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution. There are subtle nuances encoded in font variation and clever layout which can only be seen by printing this message on high-clay paper.
Received on Thursday, 5 May 2016 08:20:12 UTC