Re: [xml] column information in the error structure




  I'm not sure one can argue that parseMode is only internal data and no
application should use it. So we can't extend xmlError I think :-( and 1)
is kind of out of the possibilities, sorry, I goofed.
Yes, I found it too :(


Now about 2) most of the time int2 is not used, actually checking the __xmlRaiseError() calls it seems it's never used, or rather 0 is always
passed. So if you want to extend the error messages using int2 sounds fine
for most uses. Of course if it is error you are generating in a higher level you're really free to do what you want with those values.
The idea was to report the column number for all the errors from parser
where it is possible. I don't think this qualifies as "errors generated
on higher level" :) So would you (or anyone else) mind if I rename
"int2" into "column" and set it to the current parser column where
possible?


BTW, another question about "col" in struct _xmlParserInput: it seems
that currently it contains the character number from the beggining
of the file and not the column number from the beggining of the current
line (as I would expect from the comment :) ). Is this a bug or
a feature?

Aleksey






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