While working on the PsychoPath XPath 2.0 processor in the eclipse WTP project, I ran across the following situation. According the the W3C XPath 2.0 test suite test case CastableAs030 the following test should fail:


xs:untypedAtomic("-P1Y1M1DT1H1M1.123S") castable as xs:yearMonthDuration


The result should be false, however, we are returning true. As far as my understanding of the specification, the xs:untypedAtomic value should be treated as a string value, and when casting to xs:yearMonthDuration only the form of "-P1Y1M1" is processed ignoring the rest. It also appears that this is a validation duration describing:
a negative 1 year, 1 month, 1 day, 1 hour, 1 minute, and 1.123 seconds

At least that is my interpretation of section 17.1.4 of Casting from primitive types to primitive types. Am I missing something or is this a known bug in the W3C Test Suite?