Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants