Open GVogeler opened 9 years ago
needs changes in schema and search
schema change should address the following issues as well:
@value
is currently used for cei:date
and cei:num
but should have different semantics:
date/@value
needs the following constraints:
<xs:pattern value="-?[129]?[0-9][0-9][0-9][019][0-9][01239][0-9]"/>
, ancestor::issued
, elsewhere not.num@value
needs only a simple constraint: <xs:pattern value="-?[0-9.]+"/>
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
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.
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.