-
Notifications
You must be signed in to change notification settings - Fork 38
Description
This topic arose from one of the UI TF meetings on language handling, described in #596.
Many SHACL- and RDF-based applications face the challenge of label resolution. This problem exists in applications where a human-friendly label is required to display an RDF resource. This includes displaying resource listings in navigation menus, search or query results, and titles when viewing or editing resources.
The same challenge applies when presenting short descriptions of resources.
Here are some proposed mechanisms for resolving labels, from most specific to more general. In most cases, the selected labels should also undergo language resolution to determine the final display label and to ensure the label matches the preferred language of the user, their operating system, or the shape constraints.
Property Role Vocabulary
Ticket on property roles: #538
If a resource's node shape contains a property shape annotated with dash:propertyRole dash:LabelRole
, then the value nodes of this shape should be considered for label use.
ex:PropertyShape
a sh:PropertyShape ;
sh:path schema:name ;
dash:propertyRole dash:LabelRole .
rdfs:label
rdfs:label
is widely accepted and supported as the property to use for human-friendly labels in applications.
ex:john rdfs:label "John"@en .
Fallback options
When no options are suitable, implementations may opt to display the full IRI or blank node of the resource, or attempt to make it human-friendly by:
- displaying just the local name of the IRI
- construct a prefixed name if the application supports namespace prefixes.