Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.GregorianMonthDay.fromstring,
}, # MM-DD
{
'name': XSD_TIME,
'python_type': (unicode_type, str, datatypes.Time),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.Time.fromstring,
}, # hh:mm:ss
{
'name': XSD_DURATION,
'python_type': (unicode_type, str, datatypes.Duration),
'admitted_facets': FLOAT_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.Duration.fromstring,
}, # PnYnMnDTnHnMnS
# Other primitive types
{
'name': XSD_QNAME,
'python_type': (unicode_type, str),
'admitted_facets': STRING_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT, qname_validator],
}, # prf:name (the prefix needs to be qualified with an in-scope namespace)
{
'name': XSD_NOTATION_TYPE,
'python_type': (unicode_type, str),
'admitted_facets': STRING_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
}, # type for NOTATION attributes: QNames of xs:notation declarations as value space.
{
'name': XSD_GMONTH_DAY,
'python_type': (unicode_type, str, datatypes.GregorianMonthDay),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.GregorianMonthDay.fromstring,
}, # MM-DD
{
'name': XSD_TIME,
'python_type': (unicode_type, str, datatypes.Time),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.Time.fromstring,
}, # hh:mm:ss
{
'name': XSD_DURATION,
'python_type': (unicode_type, str, datatypes.Duration),
'admitted_facets': FLOAT_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.Duration.fromstring,
}, # PnYnMnDTnHnMnS
# Other primitive types
{
'name': XSD_QNAME,
'python_type': (unicode_type, str),
'admitted_facets': STRING_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT, qname_validator],
}, # prf:name (the prefix needs to be qualified with an in-scope namespace)
{
'name': XSD_NOTATION_TYPE,
'python_type': (unicode_type, str),
'admitted_facets': STRING_FACETS,