Re: shapes-ACTION-5: New wiki page for requirements (probably only with a few to start)

On 12/16/2014 2:33, Karen Coyle wrote:
> Thanks, Holger. This is looking quite comprehensive.
>
> One requirement that comes to mind that I'm not sure is covered in the 
> list so far is related to SKOS -- SKOS itself has a number of 
> validation requirements [1], and those might provide some hints for 
> us. The key ones that the DC group is interested in have to do with 
> rules for labels:
> - one prefLabel per language tag
> - altLabel, prefLabel and hiddenLabel cannot have the same value (per 
> language tag)
>
> Are these already covered by the requirements in the list?

Yes they can be expressed by what's on the requirements list right now. 
For example here is the SPARQL query that finds all concepts that have 
more than one prefLabel per language tag:

CONSTRUCT {
     _:b0 a spin:ConstraintViolation .
     _:b0 rdfs:label ?message .
     _:b0 spin:violationRoot ?this .
     _:b0 spin:violationPath skos:prefLabel .
}
WHERE {
     ?this skos:prefLabel ?label1 .
     ?this skos:prefLabel ?label2 .
     FILTER ((lang(?label1) = lang(?label2)) && (?label1 != ?label2)) .
     BIND (CONCAT("Constraint S14: a resource has no more than one value 
of skos:prefLabel per language tag (@", lang(?label1), ").") AS ?message) .
}

The requirements cover all building blocks to express that: Basic Graph 
Patterns (line 1 and 2 of the WHERE clause), Language Tag operations 
(line 3), Intersection of conditions (line 3), and String operations for 
the error message (line 4).

> (And I can imagine that these requirements would be an obvious 
> macro/template in a validation language.)

Yes absolutely. The logic above is easy to generalize - just make 
skos:prefLabel a variable so that it can be applied to other properties 
too. Furthermore a model can include a graph containing the above 
constraint, and all constraints will be unioned before execution. So 
basically it will be sufficient if someone publishes the SKOS 
constraints, and everyone else can simply point to them. Theoretically, 
a future version of SKOS core itself may include such constraints, so 
you'd get them for free whenever you include the SKOS namespace.

Holger

Received on Monday, 15 December 2014 22:26:44 UTC