/ lib / lxml / includes / xmlschema.pxd
xmlschema.pxd
 1  from lxml.includes.tree cimport xmlDoc
 2  from lxml.includes.xmlparser cimport xmlSAXHandler
 3  from lxml.includes.xmlerror cimport xmlStructuredErrorFunc
 4  
 5  cdef extern from "libxml/xmlschemas.h":
 6      ctypedef struct xmlSchema
 7      ctypedef struct xmlSchemaParserCtxt
 8  
 9      ctypedef struct xmlSchemaSAXPlugStruct
10      ctypedef struct xmlSchemaValidCtxt
11  
12      ctypedef enum xmlSchemaValidOption:
13          XML_SCHEMA_VAL_VC_I_CREATE = 1
14  
15      cdef xmlSchemaValidCtxt* xmlSchemaNewValidCtxt(xmlSchema* schema) nogil
16      cdef void xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxt* ctxt,
17          xmlStructuredErrorFunc serror, void *ctx)
18      cdef void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxt* ctxt,
19          xmlStructuredErrorFunc serror, void *ctx)
20  
21      cdef int xmlSchemaValidateDoc(xmlSchemaValidCtxt* ctxt, xmlDoc* doc) nogil
22      cdef xmlSchema* xmlSchemaParse(xmlSchemaParserCtxt* ctxt) nogil
23      cdef xmlSchemaParserCtxt* xmlSchemaNewParserCtxt(char* URL) nogil
24      cdef xmlSchemaParserCtxt* xmlSchemaNewDocParserCtxt(xmlDoc* doc) nogil
25      cdef void xmlSchemaFree(xmlSchema* schema) nogil
26      cdef void xmlSchemaFreeParserCtxt(xmlSchemaParserCtxt* ctxt) nogil
27      cdef void xmlSchemaFreeValidCtxt(xmlSchemaValidCtxt* ctxt) nogil
28      cdef int xmlSchemaSetValidOptions(xmlSchemaValidCtxt* ctxt,
29                                        int options) nogil
30  
31      cdef xmlSchemaSAXPlugStruct* xmlSchemaSAXPlug(xmlSchemaValidCtxt* ctxt,
32                                                    xmlSAXHandler** sax,
33                                                    void** data) nogil
34      cdef int xmlSchemaSAXUnplug(xmlSchemaSAXPlugStruct* sax_plug)
35      cdef int xmlSchemaIsValid(xmlSchemaValidCtxt* ctxt)