Re: [xml] Will xmllint use schematron?

On Wed, May 11, 2005 at 11:11:07AM +0100, Steve Little wrote:
  I read quickly. I didn't understand it.

It's not a very good site, IMHO. However, schematron itself is quite a
neat idea.

  When thinking about implementing something I read the spec. I didn't 
understood that one on the first pass though.

It seems it would require XSLT and EXSLT so it would not be implementable
at the libxml2 level since XSLT and EXSLT are provided in libraries separate
from libxml2.

I believe that only XPath is required, so it would be possible, but I
agree with Daniel that it would be better implemented as a seperate tool
on top of libxml/libxslt.

  Well if it really don't requires xslt/exslt then that would be doable.

The implementation is fairly trivial, and there are existing
implementations in XSLT:

It looks simple, problably the reason why I didn't understood the spec :-)

I've used some of the sample metastylesheets with xsltproc, and have had
no problems. If you really want a programatic interface, here's a simple
start point...
You could make a metastylesheet makes it trivial to analyse the output for

  if it really requires only XPath then a C implementation with full
report would probably be less than 500 lines based on existing libxml2

Alternatively, you can parse the schematron schemafile yourself,
implement each tag, check the XPaths etc, and thus make a libxml only
version. Arguably that's a waste of time though, when there's a Free XSLT

  did it really got the ISO standard stamp yet ? If it's short, blessed
by ISO, sensible and amount to less than 1000 lines of C and 20KB of code
I wouldn't mind getting it added to libxml2.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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