Re: Catching error messages in schematron
Daniel Veillard <veillard <at> redhat.com>
2007-08-02 12:38:23 GMT
On Thu, Aug 02, 2007 at 01:52:05PM +0200, Stefan Behnel wrote:
> Hi Daniel,
>
> Daniel Veillard wrote:
> > On Thu, Jul 19, 2007 at 08:03:24PM +0200, Stefan Behnel wrote:
> >> currently (as of libxml2 2.6.29), the schematron implementation writes
> >> validation error messages to stderr with a plain fprintf in
> >> xmlSchematronReportOutput (happily annotated with a "TODO").
> >>
> >> However, to make schematron usable in lxml, I need a way to propagate these
> >> errors to the Python level. I would therefore like to see them passed into
> >> __xmlRaiseError().
> >
> > The schematron code is really not complete, that sure could be fixed
> > but a lot more may be needed. I asked for a definitive set of test for
> > the ISO version and never got an answer, so I got discouraged and dropped
> > working on it at the time. Of course now I have far less time for libxml2
>
> Ah, that's too bad. Can you comment on how complete you consider the current
> Schematron implementation?
I would like to be able to answer. But 1/ first I don't fully remember
2/ I added support only for XPath1 tests, and the last version I saw
had support for XSLT1/2, I don't know how much is required to be
conformant, and if XSLT is needed, then the schematron support can't be
implemented within libxml2 (since it would depend on libxslt).
Basically I implemented based on a public spec, then it went to ISO
and now I don't have a test suite and it seems the final version
doesn't look 100% like what I used for the implementation
One think missing in the implementation is include support, that's
for sure.
Daniel
--
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard <at> redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/