Re: [topbraid-users] sh:argument for sh:sparql - requirements?

2016-08-29 Thread Holger Knublauch
The values of sh:argument (now called sh:parameter in the spec and the 
upcoming 5.2) must be IRIs or bnodes that have a sh:predicate pointing 
at a IRI. The properties don't need to be typed at all. I am not aware 
of any other requirement here, but the usual suspects such as 
sh:datatype and sh:class can also be used here - sh:Parameter is a 
subclass of sh:PropertyConstraint.


See https://www.w3.org/TR/shacl/#constraint-components-parameters

Holger


On 30/08/2016 7:21, Jack Hodges wrote:
If I use the 'create argument' option for sh:argument and sh:sparql, 
are there any requirements that this definition must satisfy (other 
than have a legal namespace)? Does the argument have to be of any 
particular type (other than rdf:property)? Thank you.


Jack Hodges
Siemens WoS
--
You received this message because you are subscribed to the Google 
Group "TopBraid Suite Users", the topics of which include the TopBraid 
Suite family of products and its base technologies such as 
SPARQLMotion, SPARQL Web Pages and SPIN.

To post to this group, send email to topbraid-users@googlegroups.com
---
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 topbraid-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Group "TopBraid 
Suite Users", the topics of which include the TopBraid Suite family of products and 
its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[topbraid-users] sh:argument for sh:sparql - requirements?

2016-08-29 Thread Jack Hodges
If I use the 'create argument' option for sh:argument and sh:sparql, are 
there any requirements that this definition must satisfy (other than have a 
legal namespace)? Does the argument have to be of any particular type 
(other than rdf:property)? Thank you.

Jack Hodges
Siemens WoS

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [topbraid-users] [SPIN] Overriding spl:Arguments in subclasses

2016-08-29 Thread Martynas Jusevicius
Thanks Holger.

I think a solution could be to have 2 sets of arguments: template-local (by 
default), and inheritable (defined so explicitly), or "tunneled". 
Subclasses would not see the local arguments of superclasses, and it would 
be an error to redefine tunneled arguments with a different contract.

This is the idea behind tunnel parameters in XSLT 
2.0: https://www.w3.org/TR/xslt20/#tunnel-params

On Monday, August 29, 2016 at 2:51:42 AM UTC+2, Holger Knublauch wrote:
>
> Hi Martynas,
>
> as you have found out, this scenario is not supported by SPIN. Multiple 
> declarations of the same predicate lead to undefined behavior. I am not 
> particularly keen to touch this area of code, because it is so widely used 
> and I don't want to risk regression bugs or performance degradation at this 
> stage. Given that this doesn't appear to be a common scenario, your 
> work-around is to not declare the argument twice, for example by having an 
> abstract superclass for both templates, where only the subclasses declare 
> :property.
>
> Holger
>
>
> On 29/08/2016 2:06, Martynas Jusevicius wrote:
>
> Hey,
>
> I have a somewhat artificial use case where both a class and its 
> superclass each have an spl:Argument with the same predicate, but different 
> spl:defaultValue, and possibly other properties:
>
> :Template a spin:Template ;
> spin:constraint [ a spl:Argument ;
> spl:predicate :property ;
> spl:valueType xsd:long ;
> spl:defaultValue 111
> ] .
>
> :SubTemplate a spin:Template ;
> rdfs:subClassOf :Template ;
> spin:constraint [ a spl:Argument ;
> spl:predicate :property ;
> spl:valueType xsd:long ;
> spl:defaultValue 999
> # spl:optional true
> ] .
>
> When [ a :SubTemplate ] is instantiated, what will be its :property value 
> (assuming it comes from spl:defaultValue)?
>
> I would think the subclass argument has precedence, but looking at the 
> ModuleImpl code, it seems that a List is collected from the class 
> and all its superclasses, ignoring inheritance:
>
> https://github.com/TopQuadrant/shacl/blob/master/src/main/java/org/topbraid/spin/model/impl/ModuleImpl.java
>
> But maybe the inheritance/precedence is handled somewhere else?
>
> Also, would it be illegal for the subclass to define the argument as 
> spl:optional if the superclass does not do so? Wouldn't that break the 
> template contract? I guess the same applies to redefinition of 
> spl:valueType etc.
>
> Thanks,
>
>
> Martynas
> atomgraph.com
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
> family of products and its base technologies such as SPARQLMotion, SPARQL 
> Web Pages and SPIN.
> To post to this group, send email to topbrai...@googlegroups.com 
> 
> --- 
> 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 topbraid-user...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.