shexSpec / primer

ShEx primer
MIT License
7 stars 5 forks source link

Incorrect examples / description #8

Closed CaptSolo closed 3 years ago

CaptSolo commented 7 years ago

The Advanced examples section of ShEx Primer ( https://shexspec.github.io/primer/ ) has some issues with code and/or descriptions:

  1. "Permitting Extra Properties" - the description says "must have either foaf:Person or ex:Employee as object" while the example provided requires it to have both classes.

  2. "Repeated Properties" - incorrect sample Turtle data (with foaf:name value xsd:string instead of the actual string) making both examples fail.

  3. "Inverse Triple Constraints" - validation of inst:User3 fails (due to ex:reportedIssue inst:Issue4) while the primer claims it would pass.

  4. some Turtle data samples (e.g. in "Closing Shapes", "Inverse Triple Constraints") end with ";" instead of "." .

P.S. The primer page blocks copying text via "Ctrl-C" (on Firefox at least) making it really inconvenient to copy examples. Is that intentional?

ericprud commented 7 years ago

1 updated to say

The following example asserts that every my:UserShape must have two rdf:types: ex:Employee and foaf:Person.

2 updated to use some random names

3 changed Issue4 to Issue1 [try it]

4 found and fixed two missing '.' in 4.3 Closing Shapes and the end of 4.1 Inverse Triple Constraints.

P.S. I tried to replicate the "Ctrl-C" issue with FF 53 on Ubuntu. What's your platform? This code in the bottom is supposed to leave browser control keys alone:

        $("html > body").keypress(function (evt) {
          if (evt.ctrlKey)
            return true; // don't interfere with browser control keys.

see c80683e

CaptSolo commented 7 years ago

OK, 1..4 = fixed.

P.S. I tried to replicate the "Ctrl-C" issue with FF 53 on Ubuntu. What's your platform? This code in the bottom is supposed to leave browser control keys alone:

    $("html > body").keypress(function (evt) {
      if (evt.ctrlKey)
        return true; // don't interfere with browser control keys.

Re. "Ctrl-C" issue - actually it is "Cmd-C" in my case (Mac OS X). Looks like it works ok on Windows/Linux but not on Mac.

tombaker commented 7 years ago

Cmd-C works for me on MacOS with Chrome and Safari, but not Firefox.