Duration handling requires year part when that's not required by XMLSchema

Description

Our metadata generator generates metadata with a cacheDuration="PT1H0M0.000S" (it's for testing right now, so 1H is okay). According to the XML Schema specification for duration at:

http://www.w3.org/TR/xmlschema-2/#duration

"If the number of years, months, days, hours, minutes, or seconds in any expression equals zero, the number and its corresponding designator - may- be omitted. However, at least one number and its designator - must- be present."

However, when the SP loads the file/url with this cacheDuration, it complains:

2008-06-30 15:27:29 CRIT Shibboleth.Application : error building/initializing MetadataProvider: Year separator is missing or misplaced.

If I remove the cacheDuration statement from the file, it loads completely without error.

Environment

Mac OS X 10.5 Leopard, Shibboleth 2.0 SP built via MacPorts

Activity

Show:

Scott Cantor June 23, 2009 at 12:46 PM

Closing after releases.

Scott Cantor November 20, 2008 at 4:54 PM

Reopening, encountering a variety of unfixed issues handling durations.

Scott Cantor July 1, 2008 at 5:15 PM

http://svn.middleware.georgetown.edu/view/cpp-xmltooling?view=rev&revision=505

http://svn.middleware.georgetown.edu/view/cpp-opensaml2?view=rev&revision=400

cacheDuration is explicitly not honored by the standard metadata provider, so testing this would require using the dynamic plugin. But it parses successfully now.

Scott Cantor July 1, 2008 at 11:10 AM

Validation works. Believe the bug is due to me not using the alternative method "parseDuration". Fix appears to require an API change to xmltooling, debating this at the moment, but probably will go ahead with it.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created June 30, 2008 at 3:30 PM
Updated June 23, 2009 at 12:46 PM
Resolved November 21, 2008 at 12:20 AM

Flag notifications