Lines Matching defs:ctxt
458 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
464 if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
465 (ctxt->instate == XML_PARSER_EOF))
467 if ((ctxt != NULL) && (ctxt->sax != NULL)) {
468 if (ctxt->validate) {
469 channel = ctxt->sax->error;
472 channel = ctxt->sax->warning;
475 if (ctxt->sax->initialized == XML_SAX2_MAGIC)
476 schannel = ctxt->sax->serror;
477 data = ctxt->userData;
479 __xmlRaiseError(schannel, channel, data, ctxt, NULL, XML_FROM_IO,
1782 * @ctxt: Context to cleanup
1789 xmlFreeHTTPWriteCtxt( xmlIOHTTPWriteCtxtPtr ctxt )
1791 if ( ctxt->uri != NULL )
1792 xmlFree( ctxt->uri );
1794 if ( ctxt->doc_buff != NULL ) {
1797 if ( ctxt->compression > 0 ) {
1798 xmlFreeZMemBuff( ctxt->doc_buff );
1803 xmlOutputBufferClose( ctxt->doc_buff );
1807 xmlFree( ctxt );
1857 xmlIOHTTPWriteCtxtPtr ctxt = NULL;
1862 ctxt = xmlMalloc(sizeof(xmlIOHTTPWriteCtxt));
1863 if (ctxt == NULL) {
1868 (void) memset(ctxt, 0, sizeof(xmlIOHTTPWriteCtxt));
1870 ctxt->uri = (char *) xmlStrdup((const xmlChar *)post_uri);
1871 if (ctxt->uri == NULL) {
1873 xmlFreeHTTPWriteCtxt(ctxt);
1886 ctxt->compression = compression;
1887 ctxt->doc_buff = xmlCreateZMemBuff(compression);
1893 ctxt->doc_buff = xmlAllocOutputBufferInternal(NULL);
1896 if (ctxt->doc_buff == NULL) {
1897 xmlFreeHTTPWriteCtxt(ctxt);
1898 ctxt = NULL;
1901 return (ctxt);
1954 xmlIOHTTPWriteCtxtPtr ctxt = context;
1956 if ( ( ctxt == NULL ) || ( ctxt->doc_buff == NULL ) || ( buffer == NULL ) )
1964 if ( ctxt->compression > 0 )
1965 len = xmlZMemBuffAppend( ctxt->doc_buff, buffer, len );
1969 len = xmlOutputBufferWrite( ctxt->doc_buff, len, buffer );
1977 ctxt->uri );
2015 xmlIOHTTPWriteCtxtPtr ctxt = context;
2022 if ( ( ctxt == NULL ) || ( http_mthd == NULL ) )
2029 if ( ctxt->compression > 0 ) {
2030 content_lgth = xmlZMemBuffGetContent( ctxt->doc_buff, &http_content );
2038 xmlOutputBufferPtr dctxt = ctxt->doc_buff;
2048 http_mthd, "data to URI", ctxt->uri );
2054 http_ctxt = xmlNanoHTTPMethod( ctxt->uri, http_mthd, http_content,
2069 http_mthd, ctxt->uri,
2120 "bytes to URI", ctxt->uri,
2132 xmlFreeHTTPWriteCtxt( ctxt );
2146 xmlIOHTTPClosePut( void * ctxt ) {
2147 return ( xmlIOHTTPCloseWrite( ctxt, "PUT" ) );
2160 xmlIOHTTPClosePost( void * ctxt ) {
2161 return ( xmlIOHTTPCloseWrite( ctxt, "POST" ) );
3795 * @ctxt: an XML parser context
3806 xmlCheckHTTPInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr ret) {
3820 __xmlLoaderErr(ctxt, "failed to load HTTP resource \"%s\"\n",
3823 __xmlLoaderErr(ctxt, "failed to load HTTP resource\n", NULL);
3837 xmlSwitchInputEncoding(ctxt, ret, handler);
3839 __xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
3897 * @ctxt: the context in which the entity is called or NULL
3907 xmlParserCtxtPtr ctxt) {
3921 if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
3924 resource = xmlCatalogLocalResolve(ctxt->catalogs,
3946 if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
3949 tmp = xmlCatalogLocalResolveURI(ctxt->catalogs, resource);
3973 * @ctxt: the context in which the entity is called or NULL
3981 xmlParserCtxtPtr ctxt)
3990 if ((ctxt != NULL) && (ctxt->options & XML_PARSE_NONET)) {
3991 int options = ctxt->options;
3993 ctxt->options -= XML_PARSE_NONET;
3994 ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
3995 ctxt->options = options;
3999 resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
4008 __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", ID);
4011 ret = xmlNewInputFromFile(ctxt, (const char *) resource);
4047 * @ctxt: the context in which the entity is called or NULL
4056 xmlParserCtxtPtr ctxt) {
4067 ret = xmlCurrentExternalEntityLoader(canonicFilename, ID, ctxt);
4071 return(xmlCurrentExternalEntityLoader(URL, ID, ctxt));
4084 * @ctxt: the context in which the entity is called or NULL
4093 xmlParserCtxtPtr ctxt) {
4098 resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
4113 input = xmlDefaultExternalEntityLoader((const char *) resource, ID, ctxt);