schematron.pxd
1 from lxml.includes cimport xmlerror 2 from lxml.includes.tree cimport xmlDoc 3 4 cdef extern from "libxml/schematron.h": 5 ctypedef struct xmlSchematron 6 ctypedef struct xmlSchematronParserCtxt 7 ctypedef struct xmlSchematronValidCtxt 8 9 ctypedef enum xmlSchematronValidOptions: 10 XML_SCHEMATRON_OUT_QUIET = 1 # quiet no report 11 XML_SCHEMATRON_OUT_TEXT = 2 # build a textual report 12 XML_SCHEMATRON_OUT_XML = 4 # output SVRL 13 XML_SCHEMATRON_OUT_ERROR = 8 # output via xmlStructuredErrorFunc 14 XML_SCHEMATRON_OUT_FILE = 256 # output to a file descriptor 15 XML_SCHEMATRON_OUT_BUFFER = 512 # output to a buffer 16 XML_SCHEMATRON_OUT_IO = 1024 # output to I/O mechanism 17 18 cdef xmlSchematronParserCtxt* xmlSchematronNewDocParserCtxt( 19 xmlDoc* doc) nogil 20 cdef xmlSchematronParserCtxt* xmlSchematronNewParserCtxt( 21 char* filename) nogil 22 cdef xmlSchematronValidCtxt* xmlSchematronNewValidCtxt( 23 xmlSchematron* schema, int options) nogil 24 25 cdef xmlSchematron* xmlSchematronParse(xmlSchematronParserCtxt* ctxt) nogil 26 cdef int xmlSchematronValidateDoc(xmlSchematronValidCtxt* ctxt, 27 xmlDoc* instance) nogil 28 29 cdef void xmlSchematronFreeParserCtxt(xmlSchematronParserCtxt* ctxt) nogil 30 cdef void xmlSchematronFreeValidCtxt(xmlSchematronValidCtxt* ctxt) nogil 31 cdef void xmlSchematronFree(xmlSchematron* schema) nogil 32 cdef void xmlSchematronSetValidStructuredErrors( 33 xmlSchematronValidCtxt* ctxt, 34 xmlerror.xmlStructuredErrorFunc error_func, void *data)