-
Notifications
You must be signed in to change notification settings - Fork 5
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
Question: Using datatypes other than string? #136
Comments
Should be possible from a variable - using data_var (with range xsd:boolean) + a list_annotation. Don't know whether DOSDPtools can take a literal in place of a var in this case or cast to xsd if it does. but you could try: annotations:
-
annotationProperty: is_obsolete
value: [true] (true without quotes is legal YAML for boolean btw) |
this exact syntax gives me a parse error.. :P any other idea? |
Not too surprising. The value of Simple solution: Extend the system to allow definition of internal variables, or default values for variables. I think I like default best. Extending syntax of var specification to allow is likely to be hard to achieve without breaking backwards compatibility and complicated for implementing tools. Instead we could add a new base keyword data_vars:
obs_stat: 'xsd:boolean'
default_value:
obs_stat: true
annotations:
-
annotationProperty: is_obsolete
value: obs_stat Comments? |
Another thing that would do the trick and would not require much extension at all would be to allow this:
or
That would also preserve backwards compatibility as far as I can see and only require minimal changes to dosdp-tools and the spec. |
From discussion: annotations:
- annotationProperty: is_obsolete
text: "true"
type: xsd:boolean OR data_vars:
obs_stat: 'xsd:boolean'
default_value:
obs_stat: true
annotations:
-
annotationProperty: is_obsolete
value: obs_stat |
Decision - second option. Requires DOS to extend the schema and implementation in DOSDP-tools. |
Hmmm - now slightly confused about all of this. Why do we need a default rather than specifying a value true in the TSV input? If this is read as a string when the var is specified as range boolean, & if so isn't this a DOSDP_tools bug? |
Generates a nice assertion such as
How can I get this to be xsd:boolean? I tried a few varieties (just true without quotes results in parse error, for example.)
The text was updated successfully, but these errors were encountered: