You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
1.7 KiB

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