This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In appendix C (http://www.w3.org/TR/2005/WD-xpath-datamodel-20050404/#xdtschema), declarations are given of the types yearMonthDuration and dayTimeDuration. In each, a pattern facet is given which seeks (as far as I can tell) to provide a regular expression which defines the lexical space of the new types. Since all lexical forms for values in these types must ALSO be legal lexical forms for the parent duration type, it's not really necessary to recapitulate all the constraints of that type. The patterns may be simplified to "[^DT]*" for yearMonthDuration and "[^YM]*(T.*)?" for dayTimeDuration. (The lexical space defined by these is the same as that defined by the current declarations, if my work with Grail is reliable.) If the WGs prefer to use patterns which fully capture all the constraints on lexical forms, the bug in the dayTimeDuration facet which allows forms like "P2HS" and "P2H.S" should be fixed.
A simpler pattern for dayTimeDuration is [^YM]*[DT].*" which can readily be glossed as: "You have to have a Day field or one or more of the Time fields, and they must not be preceded by any Year or Month field." It may be slightly easier to see that this is correct than that "[^YM]*(T.*)?" is correct.
Andrew asked for time to review this issue at meeting 249
Coordinate with MSM