Re: [xml] Line number always 0 on schema error



On Fri, Dec 15, 2006 at 03:57:24PM +0100, Andreas Tscharner wrote:
Hello World, heelo Daniel,

I'm validating an XML file against a schema (Delphi):

schParCtxt := xmlSchemaNewMemParserCtxt(schemBuf, schemBufLen);
sch        := xmlSchemaParse(schParCtxt);
schValCtxt := xmlSchemaNewValidCtxt(sch);
schemaRet  := xmlSchemaValidateDoc(schValCtxt, xmlFile);

If schemaRet is != 0 I'll get the error using xmlGetLastError:

if (schemaRet <> 0) then begin
  schemError := xmlGetLastError();
  ...
  ...
end;

No matter for what reason nor where an error happens during the
validation, the schemError^.line value is always 0.

I'm using libxml2 2.6.26 with the Delphi bindings...

  Please try first with the latest version, so we don't chase a 
non-existent bug.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]