Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

feat: support xsd:language datatype (+test) #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Yucukof
Copy link

@Yucukof Yucukof commented Jun 10, 2022

This PR is similar to #139 and fixes the same issue with a different data type.

@ludwigschub
Copy link
Owner

@Yucukof Hm I looked around shex.io a little bit but I couldn't find the documentation regarding xsd:language nor could I run validation on an example:

PREFIX interop: <https://interop.example.com#>
PREFIX skos: <https://skos.example.com#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

start = @<#AccessNeedDescriptionShape>

<#AccessNeedDescriptionShape> {
  a [ interop:AccessNeedDescription ] ;
  interop:inAccessDescriptionSet  IRI ;
  interop:hasAccessNeed           IRI ;
  skos:prefLabel                  xsd:language ;
}
PREFIX : <https://example.com#>
PREFIX interop: <https://interop.example.com#>
PREFIX skos: <https://skos.example.com#>

<AccessNeedDescriptionShape> 
  a interop:AccessNeedDescription ;
  interop:inAccessDescriptionSet  :Description ;
  interop:hasAccessNeed           :AccessNeed ;
  skos:prefLabel                  "EN" .
validating https://rawgit.com/shexSpec/shex.js/main/packages/shex-webapp/doc/AccessNeedDescriptionShape as https://rawgit.com/shexSpec/shex.js/main/packages/shex-webapp/doc/shex-simple.html#AccessNeedDescriptionShape:
    validating "EN":
      NodeConstraintError: expected to match <http://www.w3.org/2001/XMLSchema#language>
  OR
  Missing property: https://skos.example.com#prefLabel

Am I misunderstanding how it should be used? Also do you have an example in which shex is validating the input as xsd:language datatype?

@Yucukof
Copy link
Author

Yucukof commented Jun 18, 2022

I agree, it's kind of the weirdest format...
It takes the following shape.

interop:usesLanguage "en"^^xsd:language

Source: Data Interop Panel

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants