Re: Node vs focus node (Was: Re: shapes-ISSUE-181: SHACL conformance for partial validation reports [SHACL Spec])

Hi Karen,

This is a work in progress but tries to define focus nodes better
https://github.com/w3c/data-shapes/commit/095364dd05d103ca117eb9570d3b48ddf46a580d

regarding 2.1
maybe this also needs better wording but here's the explanation

ex:shapeA
  sh:targetClass ex:Foo.
  sh:property [
    sh:predicate ex:foo ;
    sh:shape ex:shapeB;
  ].


ex:shapeB
  sh:targetClass ex:Bar.
  sh:property []
 ...

shapeB has 2 roles in this shapes graph
1) validate all instances of ex:Bar against ex:shapeB
2) serve as a nested shape for ex:shapeA
in the latter (only) the focus nodes are provided by ex:shapeA and  the
target of ex:shapeB is ignored

we also write in the spec (2.1) :
 While targets define the starting points of the validation process, some
shapes may validate
-    less focus nodes when a shapes defines filters, or
-    additional focus nodes against different shapes, for example when
referenced via sh:shape and sh:or.

let me know if this helps and if possible, which parts are still unclear

Thanks
Dimitris


On Tue, Oct 4, 2016 at 6:03 PM, Karen Coyle <kcoyle@kcoyle.net> wrote:

> Here's what I see as the offending sentence, which is also one that Peter
> cited:
>
> "The focus nodes may also be determined as
> part of the validation of constraints that include references to shapes
> using properties such as sh:shape and sh:or."
>
> That is in the first paragraph of 2.0.
>
> See:
>
> (2.1) "Targets are ignored when a shape is processed as a nested shape in
> shape-based constraint components (i.e. sh:shape), logical constraint
> components (i.e. sh:or), filter shapes (sh:filterShape) or, for SHACL Full,
> in the evaluation of the sh:hasShape SPARQL function as defined in appendix
> A."
>
> I'm not sure what "targets are ignored" actually means, unless it means
> that the entire data graph is the target. If you ignore a target, then what
> are you paying attention to? Or is the meaning that sh:shape and sh:or
> extend the target? Where you do first connect with the data graph if there
> is no target?
>
> kc
>
>
> On 10/3/16 8:16 AM, Karen Coyle wrote:
>
>> I still find the definition of focus node circular. The focus node is
>> defined as (in terminology):
>>
>> "A node in the data graph that is validated against a shape is called a
>> focus node."
>>
>> This essentially says: if it is validated against a shape, then it is a
>> focus node.
>>
>> But there is a focus node constraint that defines constraints on the
>> focus node. So now there is a constraint defined on a focus node that
>> (as per the terminology) cannot exist until validation takes place.
>>
>> Also note that in the validation section, the only mention of focus
>> nodes is in the validation report. There is no description of using (or
>> creating) focus nodes in validation. Since the Targets section does not
>> define focus nodes, only targets, they have not been defined anywhere in
>> sections 2 or 3.
>>
>> kc
>>
>> On 10/2/16 11:35 AM, Dimitris Kontokostas wrote:
>>
>>> Hi Karen,
>>>
>>> On Sun, Oct 2, 2016 at 6:54 PM, Karen Coyle <kcoyle@kcoyle.net
>>> <mailto:kcoyle@kcoyle.net>> wrote:
>>>
>>>
>>>     Dimitris, the part of the spec we are talking about is the
>>>     validation section. If Filters take place as part of validation,
>>>     then we should move them to the validation section. If validation
>>>     takes place after the filters are applied, then at that point it is
>>>     a focus node. My understanding (and I would like to hear from
>>>     others) is that the entire process of validation takes place on
>>>     focus nodes.
>>>
>>>
>>> Section 2 describes shapes, targets, filters and constraints, then
>>> section 3 describes validation as well as the data graph, shapes graph
>>> and validation results.
>>> All constructs described in section 2 are referenced in the validation
>>> definition but any feedback to restructure these sections is more than
>>> welcome.
>>>
>>> Based on my understanding,
>>> filters are of course part of the validation process but the term focus
>>> node is used when the nodes reach the constraints of the shape.
>>> As I said, I do not have a strong opinion on this and would be happy to
>>> discuss this further during the next call or hear what others have to say
>>>
>>>     I'm also a bit concerned about that "iff" - while it is a commonly
>>>     known shorthand for "if and only if" it is not English language and
>>>     not universally known, so I think that "iff" should be written as
>>>     "if and only if" when used in a sentence. If the section were in an
>>>     abstract syntax then I think that "iff" would be appropriate. This
>>>     section is not that formal. I do find it used in W3C documents when
>>>     describing formal rules (see section 2.1 of the SWRL document [1]).
>>>
>>>
>>> I replaced iff according to your suggestion.
>>>
>>> Thanks,
>>> Dimitris
>>>
>>> --
>>> Dimitris Kontokostas
>>> Department of Computer Science, University of Leipzig & DBpedia
>>> Association
>>> Projects: http://dbpedia.org, http://rdfunit.aksw.org,
>>> http://aligned-project.eu
>>> Homepage: http://aksw.org/DimitrisKontokostas
>>> <http://aksw.org/DimitrisKontokostas>
>>> Research Group: AKSW/KILT http://aksw.org/Groups/KILT
>>> <http://aksw.org/Groups/KILT>
>>>
>>>
>>
> --
> Karen Coyle
> kcoyle@kcoyle.net http://kcoyle.net
> m: 1-510-435-8234
> skype: kcoylenet/+1-510-984-3600
>
>


-- 
Dimitris Kontokostas
Department of Computer Science, University of Leipzig & DBpedia Association
Projects: http://dbpedia.org, http://rdfunit.aksw.org,
http://aligned-project.eu
Homepage: http://aksw.org/DimitrisKontokostas
Research Group: AKSW/KILT http://aksw.org/Groups/KILT

Received on Wednesday, 5 October 2016 03:21:49 UTC