- From: David Habgood via GitHub <sysbot+gh@w3.org>
- Date: Mon, 07 Apr 2025 12:50:43 +0000
- To: public-shacl@w3.org
recalcitrantsupplant has just created a new issue for https://github.com/w3c/data-shapes: == Use case: alias for property paths == I have a few cases in recent projects where clients would like to flatten RDF, for example to generate a CSV, or render a table in HTML without complex nesting or needing to somehow indicate inverse paths visually etc. I'm already expressing the property paths that are in scope to describe a resource using sh:union. I would like a way to say there is an alias for the path, something like sh:pathAlias, and I would like the range to be an IRI so I can reference the shape / full property path that the alias is for. Looking at the spec I believe sh:name _can_ have an IRI in its range, though I don't my use case aligns with the intended use of the property. ```turtle sh:union ( [ sh:path ( sosa:isSampleOf [ sh:inversePath dcterms:hasPart ] schema:identifier ) ] ... other property paths ``` ```turtle sh:union ( [ sh:path ( sosa:isSampleOf [ sh:inversePath dcterms:hasPart ] schema:identifier ) ; sh:pathAlias <https://parent-identifier> ] ... other property paths ``` In my specific use case I'm translating this to SPARQL, so in the construct triples I would use the alias, and in the where clause use the full property paths. I believe this is possible with rules and the proposal around "calculated" fields may suit too, ideally something more succinct as above would be good - I often have 10+ property paths for a particular "profile" of a resource. Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/345 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 7 April 2025 12:50:44 UTC