Closed rockivist closed 9 years ago
@rockivist: 1 is just an oversight and 2 should be implementable (if a pain). The problem with the date validation is (I think ) because the expression need to be anchored so they match the entire value of the attr. I'll give it a try. Xpath matches() and the pattern expression matching in RNG and XSD must differ.
See #491
@tcatapano I started to try to fix it, but I think it's over my head. Here's what I've noticed:
1) The rule for ead:datesingle misses ead:fromdate and ead:todate. All three share the same single date normalization attributes, and should be handled in the same way. 2) The patterns for single date attributes as well as
@normal
on unitdate and date should only be enforced ifcontrol/@dateencoding="iso8601"
, so please incorporate that into the rule. 3) The patterns for both@normal
and the single date attributes aren't behaving correctly. As best as I can tell, if you start the attribute value with a valid date, say 1976, then the pattern matches, regardless of what follows. So "1976" does not violate the rule, but neither does "1976-1sdfadf2-01frenchfries". However, if you start with an invalid string, it fails immediately. So just "frenchfries" and "10frenchfries" do throw errors. Weird.