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 30111 - durationLexicalRep regular expression missing parentheses for year
Summary: durationLexicalRep regular expression missing parentheses for year
Status: NEW
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.1 only
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-15 16:41 UTC by Brett Kail
Modified: 2017-05-15 16:58 UTC (History)
2 users (show)

See Also:


Attachments

Description Brett Kail 2017-05-15 16:41:30 UTC
In the bulleted list of individual regular expressions for durationLexicalRep (https://www.w3.org/TR/xmlschema11-2/#nt-duTFrag), the first regular expression ("only strings in which the fields occur in the proper order") is:

-?P[0-9]+Y?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?

Parentheses are missing around the year number.  It should be:

-?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?

The all-in-one regular expression appears to be correct, but it does contain superfluous parentheses around required fragments.
Comment 1 Michael Kay 2017-05-15 16:58:56 UTC
(Personal response).

I think you are right; thanks for reporting it. There's currently no active maintenance project for the XML Schema specifications but the bug will presumably be picked up if work on XSD is resumed in the future.