shexSpec / spec

ShEx specification
https://shexspec.github.io/spec/
Other
16 stars 9 forks source link

divergence between JSON and ShExC versions of examples #22

Closed pfps closed 6 years ago

pfps commented 6 years ago

There are several examples in 5.6.4 Negation Requirement where the JSON and the ShExC versions appear to differ, including

{ "id": "http://schema.example/#S",
  "type": "ShapeNot",
  "shapeExpr": "http://schema.example/#T" }

vs

ex:S NOT @ex:T AND @ex:U

ericprud commented 6 years ago

Unfortunately, this got mixed in with a larger commit which automates verifying that the two produce the same AST. This is disabled for incomplete examples and for ShEx2.1 IMPORTS. Please close this issue if this satisfies your comment.

I believe these are the relevant fixes from that commit:

@@ -2229,14 +2230,14 @@ ex:S {ex:p <span class="lookit">NOT</span> @ex:S}
         "valueExpr": "http://schema.example/#US" } }
   ] }</pre>
                 <pre class="shexc nohighlight">                                                         
-ex:S {ex:p @ex:T} <!-- ex:S NOT @ex:T -->
+ex:US {ex:Up NOT @ex:UT} <!-- ex:S NOT @ex:T -->

-ex:T {ex:q @ex:S} <!--     ex:T @ex:S -->
+ex:UT { ex:Uq @ex:US} <!--     ex:T @ex:S -->
@@ -2328,8 +2329,8 @@ ex:T {ex:q @ex:S} <!--     ex:T @ex:S -->
     ex:S

-      NOT
-        @ex:T
+     (NOT
+        @ex:T)
      AND @ex:U

      ex:U .
@@ -2378,8 +2379,8 @@ ex:T {ex:q @ex:S} <!--     ex:T @ex:S -->

                      (
-                       NOT
-                         @ex:T
+                       (NOT
+                          @ex:T)
                        AND @ex:U )
@@ -2443,8 +2444,8 @@ ex:T {ex:q @ex:S} <!--     ex:T @ex:S -->
     ex:S

-      NOT
-        @ex:T
+      (NOT
+         @ex:T)
       AND @ex:U
                 </pre>
@@ -2503,8 +2504,8 @@ ex:T {ex:q @ex:S} <!--     ex:T @ex:S -->
     ex:S

-      NOT
-        @ex:T
+      (NOT
+         @ex:T)
     AND @ex:U
                 </pre>
               </div>
@@ -3802,28 +3805,28 @@ inst:Testgrammer23

                          &lt;http://schema.example/p1&gt;

-                         ["a" "b"] ;
+                         ["a" "b"] + ;

-                         &lt;http://schema.example/p2&gt; . {0}
+                         &lt;http://schema.example/#p2&gt; . {0}
 }              </pre>
             </div>
             <div style="clear:both;" class="exsec">Data:</div>
ericprud commented 6 years ago

Closing this should also close shexSpec/shex#83

jimkont commented 6 years ago

Closed by automating the validation of the conversion of one form to the other