[xml] schema date handling



While looking at your changes in the schema date parsing, I noticed some
oddities. You fixed the date_0.xsd file to have the correct gMonth
format for the <mon1> element but the content of <mon1> in date_0.xml is
incorrect (--05--) but not flagged as an error. 
Using gdb I traced through the code (xmlschemas.c) and found that
xmlSchemaValidatePredefinedType does return an error to
xmlSchemaValidateSimpleValue which returns an error to
xmlSchemaValidateSimpleContent which returns an error to
xmlSchemaValidateSimpleType which was called by xmlSchemaValidateContent
but does not check the return value. It appears xmlSchemaValidateContent
expects the ctxt->err to be set to some error value.
Which routine should set the ctxt->err (to what value) and print an
error message.
A similar situation exists with xmlSchemaValidateBasicType which prints
an error message when a predefined type is invalid but it does not set
ctxt-err to any error value (what should the error value be?).

I know you are concentrating on relaxng validation so I will be happy to
create a patch if you can give me some direction on where to fix things.


-- 
Charles Bozeman <cbozeman hiwaay net>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]