-
Notifications
You must be signed in to change notification settings - Fork 6
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
Provide validation information via XML metadata #45
Comments
I thought about the information we need to store in the custom xml and i think the following could work.
Detail:
/// Model.fs
type ContentType =
| OntologyTerm of string
| Text
| Url
| Boolean
| Number
| Int
| Decimal Example: <?xml version="1.0"?>
<CustomXml>
<TableValidation SwateVersion="0.1.1" >
<Worksheet WorksheetName="Experiment1" DateTime="2020-11-25 12:00" Userlist="FirstUser; SecondUser">
<TableColumn ColumnHeader="Source Name" ColumnAdress="A" Importance="0" ValidationFormat="string" Unit="None">
Source Name
</TableColumn>
<TableColumn ColumnHeader="Parameter [instrument model]" ColumnAdress="B" Importance="100" ValidationFormat="ParentOntology Instrument Model" Unit="None">
instrument model
</TableColumn>
<TableColumn ColumnHeader="Factor [day light exposure]" ColumnAdress="C" Importance="100" ValidationFormat="Float" Unit="lux" >day light exposure</TableColumn>
</Worksheet>
<Worksheet>...</Worksheet>
<Worksheet>...</Worksheet>
</TableValidation>
</CustomXml> Can use this for a nice visual xml representation. |
Looking good! I have some comments:
|
I understand what you mean, but i would keep a layer for different worksheets around. If we use templating options between worksheets in the future, the separation by a worksheet tag could make accession easier. In addition i really think this will improve readability.
Maybe we should just agree on a distinct naming convention. As both tags Tell me what you think about it, my opinion on this is not very firm. |
Here is an adjusted example for clarification: <?xml version="1.0"?>
<CustomXml>
<Validation SwateVersion="0.1.1" >
<TableValidation WorksheetName="Experiment1" DateTime="2020-11-25 12:00" Userlist="FirstUser; SecondUser">
<ColumnValidation ColumnHeader="Source Name" ColumnAdress="A" Importance="0" ValidationFormat="string" Unit="None"/>
<ColumnValidation ColumnHeader="Parameter [instrument model]" ColumnAdress="B" Importance="100" ValidationFormat="ParentOntology Instrument Model" Unit="None" />
<ColumnValidation ColumnHeader="Factor [day light exposure]" ColumnAdress="C" Importance="100" ValidationFormat="Float" Unit="lux"/ >
</TableValidation>
</Validation>
</CustomXml>
It may also be important to add the Name of the annotation table to the attributes of |
Done! This will work as of version 1.4! |
It is possible to set metadata of cells via office.js. Especially for users that create templates for others to use, information on the proposed cell contents is helpful. This would be set via a JSON string
in the XML tagwith the key "validationParams" and should have the following fields:importance - an integer between 0 and 100
content type - one of : ontologyTerm, text, number, int, decimal, url, boolean
if the content type is ontologyTerm, asdd the isA restriction if set: term[restriction]
Create a JSON schema for thisCreate a form to generate this for a column
Edit: Office.js only supports custom tags, not custom attributes on existing tags. Therefore, we need to investigate alternative places to save this information. For now we can add the validation table to the app model and later use that data to generate the file/tags/etc we need.
Edit2(by @Freymaurer): As of the latest decision all swate validation data will now be saved in the excel custom xml, as desribed here.
The text was updated successfully, but these errors were encountered: