icaruseu / mom-ca

Monasterium.net (http://www.monasterium.net/mom) - repository and collaborative archive
https://github.com/icaruseu/mom-ca/wiki
GNU General Public License v3.0
17 stars 11 forks source link

merge date/dateRange into one element #191

Open GVogeler opened 9 years ago

GVogeler commented 9 years ago

i.e. convert it to a more tei-like model: element name="date", attribute name="when", attribute name="from", attribute name="to", attribute name="not-before", attribute name="not-after" and consider the consequences for data handling in search restrictions, sorting and preliminary identification.

GVogeler commented 9 years ago

needs changes in schema and search

GVogeler commented 8 years ago

schema change should address the following issues as well: @value is currently used for cei:date and cei:num but should have different semantics:

GVogeler commented 6 years ago

Merging the two elements into one cei:date[@from && @to || @value] model would affect quite a number of code in mom-ca: https://github.com/icaruseu/mom-ca/search?utf8=%E2%9C%93&q=%22cei%3AdateRange%22

GVogeler commented 6 years ago

Merging the two would be best implemented with a constraint in the schema which secures that one and only one of the two possible attribute/attribute sets are used (with a default value of "99999999"). This can be achieved in XSD 1.1 (with e.g. <xs:assertion test="not(../@from)"/> ) and could be thus integrated into app/cei/xsd/cei.xsd. In cei10.xsd we would probably remain with allowing just all the three attributes, so we have to check for which purpose we are using the cei10.xsd and if that is affected by the issue.