This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1231 - [DM] Pattern facet for ordered durations can and should be simplified
Summary: [DM] Pattern facet for ordered durations can and should be simplified
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Data Model 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Linux
: P4 normal
Target Milestone: ---
Assignee: Norman Walsh
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://www.w3.org/XML/Group/2004/06/x...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-09 02:17 UTC by C. M. Sperberg-McQueen
Modified: 2007-04-04 19:07 UTC (History)
0 users

See Also:


Attachments

Description C. M. Sperberg-McQueen 2005-04-09 02:17:08 UTC
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.
Comment 1 C. M. Sperberg-McQueen 2005-04-12 23:22:37 UTC
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.
Comment 2 Norman Walsh 2005-04-19 15:45:19 UTC
Andrew asked for time to review this issue at meeting 249
Comment 3 Norman Walsh 2005-05-17 14:21:09 UTC
Coordinate with MSM