[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] CDATA sections do not count line numbers via SAX2 API
- From: Daniel Veillard <veillard redhat com>
- To: Dave Beckett <dave beckett bristol ac uk>
- Cc: xml gnome org
- Subject: Re: [xml] CDATA sections do not count line numbers via SAX2 API
- Date: Mon, 22 Dec 2003 11:29:22 -0500
On Mon, Dec 22, 2003 at 04:07:12PM +0000, Dave Beckett wrote:
> On Mon, 22 Dec 2003 10:56:34 -0500, Daniel Veillard <veillard redhat com> wrote:
> > Hum, I glanced over your code. I hate SAX ... callback based code is
> > just the worse design possible when it comes to understanding foreign
> > code or debugging.
> > I'm not sure xmlSAXLocatorPtr still work. The way the line number is extracted
> > from a context is from ctxt->input informations. If your code gets
> > it that way through xmlSAX2GetLineNumber() then that should work, that's how
> > xmllint itself gets them.
>
> I changed the code to use xmlSAX2GetLineNumber and
> it gives me exactly the same incorrect answers.
>
> I replaced the column callback with xmlSAX2GetColumnNumber and it gives
> entirely different and still wrong answers (the column should be ~35)
Column doesn't work. Wrt the line number the value are the same so the
locator probably use xmlSAX2GetLineNumber() internally.
xmllint get them correctly, the line information is extracted from
ctxt->input->line and seems to work okay ...xmlSAX2GetLineNumber()
also return ctxt->input->line, so I would think your code doesn't call
xmlSAX2GetLineNumber() at the right time, or there is some uncommon
parsing options being used which break line counting.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.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]