Re: [xml] RelaxNG structured error reporting



Hi,

Daniel Veillard wrote:
Does it mean that Relax NG module doesn't support the new
structured error system? Am I missing something? 

  Yes, there is room in the Relax-NG validation context for
registering such an handler but no API for this yet.

Ok. Now I'm triying to get Relax NG errors using the old API but I've faced a strange problem. If I use the 
same handlers as xmllint:

 xmlRelaxNGSetParserErrors(ctxt,
  (xmlRelaxNGValidityErrorFunc) fprintf,
  (xmlRelaxNGValidityWarningFunc) fprintf,
  stderr);

 xmlRelaxNGSetValidErrors(ctxt,
  (xmlRelaxNGValidityErrorFunc) fprintf,
  (xmlRelaxNGValidityWarningFunc) fprintf,
  stderr);

then I don't get filename or line number information. But xmllint does, and there's a message posted by Petr 
Pajas a few days ago (http://mail.gnome.org/archives/xml/2003-November/msg00018.html) saying that setting 
xmlRelaxNGSetValidErrors error handlers to fprintf reported full information. I've debugged "xmllint --noout 
--relaxng test.rng test.xml" but I can't find what makes the difference.

Is there any special option or global variable?

Though the error are reported globally and can probably be trapped by
a global structured handler. Not tested yet,


If a global structured handler means "xmlThrDefSetStructuredErrorFunc(ctxt, myXmlStructuredErrorFunc)" I 
tested it but no success, the handler is never called when a Relax NG validation error raises.

Thanks a lot,
Manuel

Note: I use CVS 7/11/2003





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