[xml] schema validation errors missing line number



I'm having some trouble getting useful error output from the libxml
schema validation.
I get reasonable return values from xmlSchemaValidateDoc(), according
to whether the document is valid
or not, but when it is not valid the errors are not as informative as
they should be.

When I use xmllint (xmllint --schema <myschema> -) I get output similar
to this:
-:30: element zip: Schemas validity error : Failed to validate type
with facet maxLength
However, when I try to use my own code, I only get
Failed to validate type with facet maxLength

I tried looking through xmllint.c to figure out what it's doing, but I
don't see anything different.  Then again, it
would have been easy to miss something in the maze of ifdefs.

Anyone have any ideas?  I'm using libxml version 20605.  The code I'm
using is attached.

eric

Attachment: my_validate.c_fragment
Description: Binary data



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