Thanks, I will report That library is a port of SHACL.js, and it also has the same issue, in case you'd want to support the original library too :)
poniedziaĆek, 5 kwietnia 2021 o 01:13:58 UTC+2 Holger Knublauch napisaĆ(a): > Hi Tom, > > you may want to contact the developers of that API directly. I have > confirmed that TopBraid (Java code) seems to handle this scenario > correctly. Having no sh:minCount means that both branches will always be > satisfied, while adding sh:minCount 1 should make the sh:xone behave as > expected. > > Holger > > > On 4/04/2021 11:59 pm, Tomasz Pluskiewicz wrote: > > Hello > > I've just finished integrating SHACL validation into Shaperone form > builder <https://forms.hypermedia.app> (using rdf-validate-shacl > <https://www.npmjs.com/package/rdf-validate-shacl>) and I noticed that > using a simple xone logical constraint, the validation does not pass if > sh:minCount is not set. > > Here's an example > <https://forms.hypermedia.app/playground/?resource=%7B%0A++%22%40context%22%3A+%7B%0A++++%22rdf%22%3A+%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%2C%0A++++%22rdfs%22%3A+%22http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%22%2C%0A++++%22xsd%22%3A+%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%22%2C%0A++++%22schema%22%3A+%22http%3A%2F%2Fschema.org%2F%22%2C%0A++++%22foaf%22%3A+%22http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%22%2C%0A++++%22vcard%22%3A+%22http%3A%2F%2Fwww.w3.org%2F2006%2Fvcard%2Fns%23%22%0A++%7D%2C%0A++%22%40id%22%3A+%22http%3A%2F%2Fexample.com%2FJohn_Doe%22%2C%0A++%22%40type%22%3A+%22schema%3APerson%22%2C%0A++%22http%3A%2F%2Fexample.com%2FfullName%22%3A+%22John+Doe%22%0A%7D&selectedResource=http%3A%2F%2Fexample.com%2FJohn_Doe&shapes=%40prefix+sh%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23%3E+.%0A%40prefix+schema%3A+%3Chttp%3A%2F%2Fschema.org%2F%3E+.%0A%40prefix+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E+.%0A%40prefix+ex%3A+%3Chttp%3A%2F%2Fexample.com%2F%3E+.%0A%40prefix+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E+.%0A%40prefix+dash%3A+%3Chttp%3A%2F%2Fdatashapes.org%2Fdash%23%3E+.%0A%0Aex%3APersonShape%0A++a+sh%3AShape+%3B%0A++sh%3AtargetClass+schema%3APerson+%3B%0A++rdfs%3Alabel+%22Person%22+%3B%0A++sh%3Axone+%28%0A++++%5B%0A++++++rdfs%3Alabel+%22Full+name%22+%3B%0A++++++sh%3Aproperty+%5B%0A++++++++sh%3Aname+%22Full+name%22+%3B%0A++++++++sh%3Apath+ex%3AfullName+%3B%0A++++++++%23+sh%3AminCount+1+%3B%0A++++++++sh%3AmaxCount+1+%3B%0A++++++%5D%0A++++%5D%0A++++%5B%0A++++++rdfs%3Alabel+%22First+%26+last+name%22+%3B%0A++++++sh%3Aproperty+%5B%0A++++++++sh%3Aname+%22First+name%22%3B%0A++++++++sh%3Apath+ex%3AfirstName+%3B%0A++++++++%23+sh%3AminCount+1+%3B%0A++++++++sh%3AmaxCount+1+%3B%0A++++++%5D+%2C%0A++++++%5B%0A++++++++sh%3Aname+%22Last+name%22+%3B%0A++++++++sh%3Apath+ex%3AlastName+%3B%0A++++++++%23+sh%3AminCount+1+%3B%0A++++++++sh%3AmaxCount+1+%3B%0A++++++%5D%0A++++%5D%0A++%29+%3B%0A.>, > > which for same data will work if you uncomment the three lines on the left. > > The same validation is returned in the original SHACL Playground. > > Is this correct or maybe an error in the validation logic? > > Regards, > Tom > > -- > You received this message because you are subscribed to the Google Groups > "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/9f4206b3-8ca6-4302-b566-11647ef1524en%40googlegroups.com > > <https://groups.google.com/d/msgid/topbraid-users/9f4206b3-8ca6-4302-b566-11647ef1524en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e8648f76-ae71-4d52-b447-2ed36c61ee47n%40googlegroups.com.
