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

DASH DatePickerEditor: sh:datatype should be xsd:date, but in FDP only sh:dateTime is accepted #504

Open
66Noah2018 opened this issue Jan 22, 2024 · 1 comment

Comments

@66Noah2018
Copy link

What components are related to the issue?

Metadata Schemas

Which FDP are you using?

My local instance

Version

Server
Version	v1.16.1~a1adf7b
Built at	16. 1. 2023, 19:56
Client
Version	v1.16.2~0fffee6
Built at	16. 1. 2023, 21:41

What happened?

When using the DASH DatePickerEditor, the sh:datatype should be xsd:date (see https://datashapes.org/forms.html#DatePickerEditor). But if this is specified as such in a metadata schema, you will get a datatype constraint error when adding a new record based on this schema. This is resolved by using sh:dateTime instead, but this is not correct according to DASH. In code:

:ClinicalTrialShape a sh:NodeShape;
    sh:targetClass :ClinicalTrial;
    sh:property [
        sh:path :startDate;
        sh:name "Study Start Date";
        sh:order 10;
        sh:minCount 1;
        sh:maxCount 1;
        sh:datatype xsd:dateTime;
        dash:editor dash:DatePickerEditor;
        dash:viewer dash:LiteralViewer;
    ]

It works but is invalid according to DASH

It should be:

:ClinicalTrialShape a sh:NodeShape;
    sh:targetClass :ClinicalTrial;
    sh:property [
        sh:path :startDate;
        sh:name "Study Start Date";
        sh:order 10;
        sh:minCount 1;
        sh:maxCount 1;
        sh:datatype xsd:date;
        dash:editor dash:DatePickerEditor;
        dash:viewer dash:LiteralViewer;
    ]

valid, but throws the aforementioned error

Relevant log output

No response

@dennisvang
Copy link

Not sure if this is directly related, but #355 also describes a problem with sh:dateTime.

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

No branches or pull requests

2 participants