Duration handling requires year part when that's not required by XMLSchema
Basics
Technical
Logistics
Basics
Technical
Logistics
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:
"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
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.
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.