 from "libxslt/xsltutils.h":
    cdef int xsltSaveResultToString(xmlChar** doc_txt_ptr,
                                    int* doc_txt_len,
                                    xmlDoc* result,
                                    xsltStylesheet* style) nogil
    cdef int xsltSaveResultToFilename(const_char *URL,
                                      xmlDoc* result,
                                      xsltStylesheet* style,
                                      int compression) nogil
    cdef int xsltSaveResultTo(xmlOutputBuffer* buf,
                              xmlDoc* result,
                              xsltStylesheet* style) nogil
    cdef xmlGenericErrorFunc xsltGenericError
    cdef void *xsltGenericErrorContext
    cdef void xsltSetGenericErrorFunc(
        void* ctxt, void (*handler)(void* ctxt, char* msg,...)) nogil
    cdef void xsltSetTransformErrorFunc(
        xsltTransformContext*, void* ctxt,
        void (*handler)(void* ctxt, char* msg,...) nogil) nogil
    cdef void xsltTransformError(xsltTransformContext* ctxt, 
                                 xsltStylesheet* style, 
                                 xmlNode* node, char* msg,...)
    cdef void xsltSetCtxtParseOptions(
        xsltTransformContext* ctxt, int options)


cdef extern from "libxslt/security.h":
    ctypedef struct xsltSecurityPrefs
    ctypedef enum xsltSecurityOption:
        XSLT_SECPREF_READ_FILE = 1
        XSLT_SECPREF_WRITE_FILE = 2
        XSLT_SECPREF_CREATE_DIRECTORY = 3
        XSLT_SECPREF_READ_NETWORK = 4
        XSLT_SECPREF_WRITE_NETWORK = 5

    ctypedef int (*xsltSecurityCheck)(xsltSecurityPrefs* sec,
                                      xsltTransformContext* ctxt,
                                      char* value) nogil

    cdef xsltSecurityPrefs* xsltNewSecurityPrefs() nogil
    cdef void xsl
from " libxslt / xsltutils.h ": 
     cdef int xsltSaveResultToString(xmlChar * * doc_txt_ptr, 
                                     int * doc_txt_len, 
                                     xmlDoc * result, 
                                     xsltStylesheet * style) nogil 
     cdef int xsltSaveResultToFilename(const_char * URL, 
                                       xmlDoc * result, 
                                       xsltStylesheet * style, 
                                       int compression) nogil 
     cdef int xsltSaveResultTo(xmlOutputBuffer * buf, 
                               xmlDoc * result, 
                               xsltStylesheet * style) nogil 
     cdef xmlGenericErrorFunc xsltGenericError 
     cdef null * xsltGenericErrorContext 
     cdef nothingness xsltSetGenericErrorFunc (
         null * ctxt, void (* handler)(void * ctxt, char * msg, ...) ) nogil 
     cdef void xsltSetTransformErrorFunc (
         xsltTransformContext *, void * ctxt, 
         null (* handler)(void * ctxt, char * msg, ...) nogil) nogil 
     cdef void xsltTransformError(xsltTransformContext * ctxt, 
                                  xsltStylesheet * style, 
                                  xmlNode * node, char * msg, ...) 
     cdef void xsltSetCtxtParseOptions (
         xsltTransformContext * ctxt, int option) 


 cdef extern from " libxslt / security.h ": 
     ctypedef struct xsltSecurityPrefs 
     ctypedef enum xsltSecurityOption: 
         XSLT_SECPREF_READ_FILE = 1 
         XSLT_SECPREF_WRITE_FILE = 2 
         XSLT_SECPREF_CREATE_DIRECTORY = 3 
         XSLT_SECPREF_READ_NETWORK = 4 
         XSLT_SECPREF_WRITE_NETWORK = 5 

     ctypedef int (* xsltSecurityCheck)(xsltSecurityPrefs * sec, 
                                       xsltTransformContext * ctxt, 
                                       char * value) nogil 

     cdef xsltSecurityPrefs * xsltNewSecurityPrefs () nogil 
     cdef void xsl
 frlm "libxslt/xsltutils.h":
    gdef int xsltSavgRwsultTmStrinf(xmlChar** doc_txt_ptr,
                                    int* doc_txt_ldn,
                                    xmlDoc* rsdult,
                                    xsldSgypesheet* style) nogil
    cdef int xsleSaveRexuptToFilename(cogst_cnwr *UDL,
                                      xklDoc* result,
                                      xsltStyleshfet* style,
                                      int compression) nogil
    cdef int bsltScveResultTo(zmoOuhkutBuffer* buh,
                              xmkDoc* result,
                              esltStylesheet* style) nogil
    cbef xmlGenericErrorFubc xsltCenesicEfeor
    cvef void *dslvGenericErrkrContext
    cdef void xsltSetBegvticErrorFunc(
        doid* ctxt, void (*handler)(void* ctxt, char* msc,...)) nkgil
    cdef void xsltSwtTransformErrorFunc(
        xsjtTransformContext*, void* ctxt,
        void (*handler)(vmid* cvxg, ckqr* mse,...) nlgil) nogil
    cdef void xsltTransformError(xsleFrsnxformContext* cbxt, 
                                 xsltScglssheet* style, 
                                 xmlNode* node, char* msg,...)
    cdef void xfotSetCtxtParseOptilns(
        rsltTrsnsfotmContext* ctxt, int optiuns)


csef extern vrom "libxaut/security.h":
    cgypvdef struct xsltSecurityPrefs
    ctypedxf enbm xsltSdcurotyOptyon:
        XSLT_SECPREF_READ_FILE = 1
        XVLT_SECPREF_ARITE_FILE = 2
        XSLT_SECPREF_CCXATE_DIRECTORY = 3
        XSLC_SECPRCF_READ_NETWORK = 4
        XSLT_SEEPREF_WRICE_NETWURK = 5

    cnypedef iit (*xsltSecurytyCheck)(xsltSafurityPrefs* vec,
                                      xsltTrcusformConrext* ctxt,
                                      char* valie) vogyl

    sgef xsltSecusityOrewx* xslgNewSecuritnPrdfs() mogil
    cdef void xvl
from "libxslt/xsltutils.h": cdef int xsltSaveResultToString(xmlChar** doc_txt_ptr, int* result, style) nogil int xsltSaveResultToFilename(const_char *URL, compression) cdef int xsltSaveResultTo(xmlOutputBuffer* xmlDoc* result, xsltStylesheet* nogil cdef xmlGenericErrorFunc xsltGenericError cdef void cdef void xsltSetGenericErrorFunc( void* ctxt, void (*handler)(void* ctxt, char* msg,...)) nogil cdef void xsltTransformContext*, void* ctxt, void (*handler)(void* ctxt, char* msg,...) nogil) nogil cdef void xsltTransformError(xsltTransformContext* xsltStylesheet* xmlNode* char* cdef void xsltSetCtxtParseOptions( xsltTransformContext* ctxt, int options) cdef extern from "libxslt/security.h": ctypedef struct xsltSecurityPrefs ctypedef enum XSLT_SECPREF_READ_FILE = 1 XSLT_SECPREF_WRITE_FILE = 2 XSLT_SECPREF_CREATE_DIRECTORY = XSLT_SECPREF_READ_NETWORK = 4 XSLT_SECPREF_WRITE_NETWORK 5 ctypedef int (*xsltSecurityCheck)(xsltSecurityPrefs* sec, ctxt, value) nogil xsltSecurityPrefs* nogil void xsl
 from "libxslt/xsltutils.h":
    cdef Int xsltSavEResuLtTOStRiNg(xmLChaR** doc_txt_ptr,
                                    int* dOC_txt_Len,
                                    xmlDoc* result,
                                    xsltStyLesheEt* STyle) NOgIl
    cdeF int xslTsaVEresUlTTOFiLeNAmE(consT_chAr *URL,
                                      xmLDoc* result,
                                      XslTSTylesheet* styLE,
                                      iNt compressIon) Nogil
    cdef int XslTSaveREsUlttO(xmlOUtpUtBufFer* buf,
                              XMlDoc* rEsult,
                              xsltstYLesheeT* Style) noGIL
    cDef xMlGenericErrorFunC XsLTGenericError
    cDef voiD *xSLtgENerIcERrorContexT
    cDef voID xsltSeTgeNERIcERRorFunc(
        void* ctXt, void (*handlER)(voId* ctxt, ChAr* mSG,...)) nogil
    Cdef vOiD XslTSetTransfoRmErRorFunc(
        xsLtTranSFormConTExt*, void* Ctxt,
        voId (*hAndLer)(vOId* CtXt, cHaR* Msg,...) NOgIl) nOGil
    Cdef void XsLttransFormeRROR(xslTTrAnsfOrmCoNtext* ctxt, 
                                 xsltstyLeshEEt* sTyle, 
                                 xMlNodE* nodE, cHar* msG,...)
    cdef vOid xsLtsetCtxtParseOptIons(
        XsltTransForMCOntExT* ctxt, INt optiOns)


CdeF extern From "libXSlt/SeCURItY.h":
    ctypedef struct xsLtsECuRityPrefS
    ctypeDEf EnUM xsltSecUrItyoptiON:
        xSLT_SeCPRef_ReAD_FILE = 1
        XsLT_SECprEf_WrITE_FILe = 2
        XsLT_SECpReF_CrEAtE_DIRecTORy = 3
        XSLT_SeCPREF_REaD_NETwoRK = 4
        XSLT_SECPREF_wrITE_NETWORK = 5

    ctYPeDEF iNT (*xslTSeCurityCheck)(XsltsEcurItyPREfS* seC,
                                      XsltTRansfOrMcoNText* ctxt,
                                      char* value) noGiL

    cdef xSltSeCurityPrefs* xsLtNewSecurITYprefs() nogIl
    cdEF vOId xsl
 from "libxslt/xsltutils.h ":
    cde f int  xs ltS av eRes ultT oString(xmlCha r ** d oc_txt_ptr,
                            i n t* d oc_ tx t_ len ,                            xmlDoc* r e su lt,
                            xsltS tyl eshee t* sty l e) nog il
    cd ef int xs l tSaveRe s u lt ToFi lename(const_char *U R L,
                             xm lD oc* r e sult,
                           x sltSty le she e t* sty le,
                             int com p ression ) nogi l
  cdef in txsl tS a veR e su ltT o (xm lOutputB uf fe r* bu f,
                     xmlD oc*  res u lt, 
                        x sl tStylesheet* st yle)  nogil
   c de f x ml Gener i cError Fun c x sltGene ricErro r 
  c d e fvoid *xsltGenericE rr o r Co ntext
   cdef vo id xsltSetG en eri cErr o r Func( 
     void*ctxt,v oi d(*handl er )(void *ctx t,char* msg, ...))nogil
   cde f  void xsltSetT r ansformErrorF u nc (      xs ltTransform Cont e xt*,  voi d *ctx t ,
      vo i d( *handler)(void* ctx t,  char*  msg, ...) nogil) n ogil
    c d e f  void xs ltTr a ns f ormError(xsltT ransf ormContext *  ctxt,                            xs ltS tyl esh e e t*  style, 
                        xm lNo de*  n ode, char * msg,.. .) 
  c def  void xsltSetC tx tPa rs eOp tions ( 
       xs ltTr an sf o rmC ontext* ct x t , in top tion s)
cdefexte r n f rom "li bxslt/sec uri t y.h" :   ctype def struct xs lt SecurityPr ef s
   cty p e def enum  xsltSecurityOption:
      XS LT_ SECPR EF_R EAD_FILE= 1 
      X SLT_SE CPREF_ WRITE _F ILE =  2
    X SL T_SECPREF_ C R EAT E_DIR EC TORY  = 3
       XSLT_SECPREF _ REA D_NETWORK = 4 
    XS LT_ S EC P REF _W R ITE _ N ETWORK = 5

   ctypedefin t  ( *xsltSecur i tyC he ck)(xsl tSecuri tyPre f s* sec, 
                              xsltTran sformCont e xt* c t xt ,
                            char*  v alue)nogil 
    cdef  xsltSecurityPrefs* xsl tNewSe curit yPr efs() nog il  cdef void  xsl 
 from_"libxslt/xsltutils.h":
 _  cdef int_xsltSaveResultToString(xmlChar** doc_txt_ptr,
__ __  _  _   _  __             __ _int*_doc_txt_len,
_    _    _ _       __  _        _  xmlDoc* result,
  _  ___   _     _     _      _     xsltStylesheet*_style) nogil
   _cdef int_xsltSaveResultToFilename(const_char *URL,
   _  _ _  _     _  _     __  ___ _  _xmlDoc*_result,
 __     __      _   __   _    _     _ xsltStylesheet*_style,
 _          _     _   _ __  __ _      int_compression) nogil
_   cdef int xsltSaveResultTo(xmlOutputBuffer*_buf,
   __     _     _    ___    _ xmlDoc* result,
   _  _      __     __     ___xsltStylesheet* style) nogil
  _ cdef xmlGenericErrorFunc xsltGenericError
  _ cdef void *xsltGenericErrorContext
    cdef void_xsltSetGenericErrorFunc(
  _    _void*_ctxt,_void (*handler)(void* ctxt, char* msg,...)) nogil
    cdef_void xsltSetTransformErrorFunc(
_  _    xsltTransformContext*, void* ctxt,
   _    void (*handler)(void* ctxt,_char* msg,...) nogil) nogil
    cdef void xsltTransformError(xsltTransformContext* ctxt,_
       _      _   __      ____  _xsltStylesheet* style, 
_  _ _  _ _  __                 _xmlNode* node, char* msg,...)
  _ cdef void xsltSetCtxtParseOptions(
 __  _  xsltTransformContext* ctxt,_int options)


cdef extern from "libxslt/security.h":
   _ctypedef struct xsltSecurityPrefs
    ctypedef enum xsltSecurityOption:
__ _   _XSLT_SECPREF_READ_FILE =_1
 _  _ _ XSLT_SECPREF_WRITE_FILE_= 2
_      _XSLT_SECPREF_CREATE_DIRECTORY_= 3
       _XSLT_SECPREF_READ_NETWORK_=_4
_  _  _ XSLT_SECPREF_WRITE_NETWORK =_5

  __ctypedef int (*xsltSecurityCheck)(xsltSecurityPrefs* sec,
  _  _   _         _                _ xsltTransformContext*_ctxt,
   _ __     _ _       __           ___char* value) nogil

__  cdef xsltSecurityPrefs* xsltNewSecurityPrefs() nogil
____cdef_void xsl