W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > November 2016

test suite data structures

From: Eric Prud'hommeaux <eric@w3.org>
Date: Tue, 22 Nov 2016 11:23:46 -0500
To: public-rdf-shapes@w3.org
Message-ID: <20161122162344.GC7373@w3.org>
According to
<http://w3c.github.io/data-shapes/data-shapes-test-suite/>, the test
suite includes positive and negative flavors of two kinds of tests:

  postivive node and shape:
    mf:action [
      sht:schema <example-schema.shc> ; 
      sht:schema-format sht:SHACLC   ; 
  	 sht:data <example-data.ttl> ; 
  	 sht:data-format sht:TURTLE ;
  	 sht:node :x ;
  	 sht:shape :Shape1
    ] ;
    mf:result true ; # or false

  postitive data and schema:
    mf:action [
      sht:schema <example-schema.shc> ; 
      sht:schema-format sht:SHACLC   ; 
  	 sht:data <example-data.ttl> ; 
  	 sht:data-format sht:TURTLE ;
    ] ;
    mf:result true ; # or false

as well as schema well-formedness tests:
   mf:action [
     sht:schema <example-schema.shc> ; 
     sht:schema-format sht:SHACLC   ; 
   ] ;
   mf:result true ; # or false

ShEx tests factor the data and schema tests into two components, a
step which takes a schema and a *separate* "control graph" with
sh:target* properties. These produce node/shape pairs like you would
see with node and shape tests. Thus we have only one form:
  <#1literalTotaldigits_pass-decimal-short> a
      sht:ValidationTest ; # or ValidationFailure
    mf:name "1literalTotaldigits_pass-decimal-short" ;
    sht:trait sht:TotalDigitsFacet ;
    rdfs:comment """<S1> in <S1> { <p1> LITERAL TOTALDIGITS 5 }
                    on <s1> in { <s1> <p1> 1.234 }""" ;
    mf:status mf:proposed ;
    mf:action [
      sht:schema <../schemas/1literalTotaldigits5.shex> ;
      sht:shape <http://a.example/S1> ;
      sht:data <Is1_Ip1_DEC1_234.ttl> ;
      sht:focus <http://a.example/s1>
    ] ;
    mf:result <1literalTotaldigits_pass-decimal-short.val>

PROPOSE: to remove the "sht:data-format sht:TURTLE" triple.
PROPOSE: to rename sht:node to sht:focus (or initial focus)
  because both the schema graph and the data graph have nodes.
PROPOSE: separate the target* parsing from validation with a strucure like:

  <S123> a sht:SelectionTest
    mf:action <example-data.ttl> ;
      [ sht:focus <F1> ; sht:shape <S1> ],
      [ sht:focus <F2> ; sht:shape <S2> ],
      [ sht:focus <F3> ; sht:shape <S2> ].

  and then use node tests.

ISSUE: should we use that pairs notation for the input to tests?
  Theoretically not necessary, but kind of nice for bulk tests.

office: +1.617.599.3509
mobile: +

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 Tuesday, 22 November 2016 16:23:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:46 UTC