[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] column information in the error structure
- From: Daniel Veillard <veillard redhat com>
- To: Aleksey Sanin <aleksey aleksey com>
- Cc: xml <xml gnome org>
- Subject: Re: [xml] column information in the error structure
- Date: Mon, 3 Jan 2005 16:45:52 -0500
On Mon, Jan 03, 2005 at 01:35:17PM -0800, Aleksey Sanin wrote:
> > 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?
I would not rename it in the structure, I would just change the comment,
but I would rename it in the functions arguments like __xmlRaiseError
since it doesn't generate an API change.
> 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?
A bug :-), each time the line is increased, it should be reset to 1 of
course ... which apparently I forgot to do sometimes. Actually it is reset
to 1 in a number of places, but not in the fast paths. The only doubt I
had was about xmlByteConsumed() but it doesn't seems to use col.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]