Re: Validating Schemas

Hello Irene,

What would like to accomplish with respect to validation of the schema is
the following:

I would like to make sure it is valid json-ld document. I have not typed
"@Ib" instead of "@id". That there is a "@id" key for every object.
Additionally, that when I have declared something as a subclass, that the
superclass exists and there are no typos in the superclass name.


I do use rdfs:Class, rdf:Property, & rdfs:subClassOf and a couple of
others. (
https://gist.github.com/James-Hudson3010/7deec4df32aa6b97509aeb490f1edf9b )

Thank you for the suggestion for the SHACL to validate SHACL itself. I will
take a closer look at that.

Regards,
James


Regards,
Eric

On Thu, Mar 26, 2020 at 3:48 PM Irene Polikoff <irene@topquadrant.com>
wrote:

> It all depends on what you are needing to accomplish with respect to the
> validation.
>
> It looks like your schema does not use any of the standard schema
> languages like RDFS or SHACL or OWL. With this, to me, it is not any
> different from the instance data. And even if your schema was in let’s say
> SHACL. In the end, it is all the same - it is some RDF that you are
> validating against some shapes.
>
> Here is an example of using SHACL to validate SHACL itself
> https://www.w3.org/TR/shacl/#shacl-shacl. May be it will give you some
> ideas.
>
> On Mar 26, 2020, at 3:14 PM, James Hudson <jameshudson3010@gmail.com>
> wrote:
>
> Hello Irene,
>
> Thank you for your comments.
>
> Yes, that is what I mean by an “alternative representation of RDF”.
>
> I can certainly see how SHACL would be valuable in validating the instance
> data (
> https://gist.github.com/James-Hudson3010/227ffb77b853a29556be5b5c3a67c309
> ).
>
> What I am not certain of is how it might be valuable in validating the
> schema itself (
> https://gist.github.com/James-Hudson3010/7deec4df32aa6b97509aeb490f1edf9b
> ) upon which the instance was based. Perhaps it is not and that is what you
> appear to be suggesting.
>
> Regards,
> James
>
>
> On Thu, Mar 26, 2020 at 2:57 PM Irene Polikoff <irene@topquadrant.com>
> wrote:
>
>> JSON-LD, Turtle, RDF/XML, etc. are all different alternative text
>> serialization formats for RDF.  Is this what you meant by “alternative
>> representation of RDF”?
>>
>> SHACL does not validate at the level of “is this a valid RDF
>> serialization”. It validates at the level “does this RDF data have the
>> expected shape”.
>>
>> I believe pretty much any RDF-based software already has the ability to
>> successfully serialize and de-serialize standard text formats and report an
>> error if the format is incorrect.
>>
>> On Mar 26, 2020, at 2:43 PM, James Hudson <jameshudson3010@gmail.com>
>> wrote:
>>
>> Hello,
>>
>> Yes, I understand that. A json-ld document is an alternate representation
>> of RDF.
>>
>> Regards,
>> James
>> `
>>
>> On Thu, Mar 26, 2020 at 2:35 PM Irene Polikoff <irene@topquadrant.com>
>> wrote:
>>
>>> Hello James,
>>>
>>> SHACL validates RDF. It does not validate text serializations of RDF to
>>> make sure that a serialized document/file itself is a syntactically valid
>>> sterilization of RDF.
>>>
>>> So, I would think that first you'd need to have a document that is a
>>> valid serialization of RDF i.e., it can be successfully parsed and
>>> de-serialized. Then, you could use SHACL to ensure that RDF data
>>> corresponds to the SHACL shapes that describe it. I am using “RDF data”
>>> loosely, meaning any set of RDF triples, whether it is data or schema does
>>> not matter. By schema I mean the model of the data - classes, properties,
>>> allowed values for properties.
>>>
>>> On Mar 26, 2020, at 1:33 PM, James Hudson <jameshudson3010@gmail.com>
>>> wrote:
>>>
>>> Hello,
>>>
>>> Being rather new to the linked data world, I am at the point where I
>>> need to work out the best methods for validating schema's and the role that
>>> SHACL may or may not be able to play.
>>>
>>> Since it is easier to discuss something real, I have created a sample
>>> schema in the json-ld format and have made it available here:
>>>
>>> https://gist.github.com/James-Hudson3010/7deec4df32aa6b97509aeb490f1edf9b
>>>
>>> It can be entered into the json-ld playground and visualized without
>>> error.
>>>
>>> What I mean by validation of the schema, is that I would like to make
>>> sure it is valid json-ld document. I have not typed "@Ib" instead of "@id".
>>> That there is a "@id" key for every object. Additionally, that when I have
>>> declared something as a subclass, that the superclass exists and there are
>>> no typos in the superclass name.
>>>
>>> Perhaps someone has already been working on to playing with shape files
>>> for json-ld schema's.
>>>
>>> Perhaps I am ascribing capabilities to SHACL that it does not have.
>>>
>>> Any thoughts or comments would be appreciated.
>>>
>>> Additionally, for completeness, I have created an instance based on this
>>> schema and that can be found here:
>>>
>>> https://gist.github.com/James-Hudson3010/227ffb77b853a29556be5b5c3a67c309
>>>
>>> Regards,
>>> James
>>>
>>>
>>>
>>
>

Received on Thursday, 26 March 2020 20:06:24 UTC