Re: [xml] validate by schema works but only after reparsing ?

Hi Daniel,

On Tue, Jul 08, 2003 at 07:16:13AM -0400, Daniel Veillard wrote:
It is intentional behaviour storing line numbers into content ?
  yes, that's the only way I could add this feature.

ok, I looked over the xmlschemas.c and found this:

5416    if ((elem->content == NULL) || (type == NULL) || (elemDecl == NULL))
5417        return(0);

I removed the part '(elem->content == NULL)' for testing and the validation
worked as expected (without need xml file to be reparsed):

5416    if ((type == NULL) || (elemDecl == NULL))
5417        return(0);

But, I don't know which functionality will be affected by removing this item,
I assume this was there because of a good reason.

On other hand, as I could see, schema validation don't really need line numbers,
(only to point out the faulty line in an error message)
so I think it wouldn't be dangerous to remove this content-comparison.

But maybe do you have a better idea ?

best Regards,

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