Home | History | Annotate | Download | only in libxml2

Lines Matching full:ctxt

439     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
445 if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
446 (ctxt->instate == XML_PARSER_EOF))
448 if ((ctxt != NULL) && (ctxt->sax != NULL)) {
449 if (ctxt->validate) {
450 channel = ctxt->sax->error;
453 channel = ctxt->sax->warning;
456 if (ctxt->sax->initialized == XML_SAX2_MAGIC)
457 schannel = ctxt->sax->serror;
458 data = ctxt->userData;
460 __xmlRaiseError(schannel, channel, data, ctxt, NULL, XML_FROM_IO,
1716 * @ctxt: Context to cleanup
1723 xmlFreeHTTPWriteCtxt( xmlIOHTTPWriteCtxtPtr ctxt )
1725 if ( ctxt->uri != NULL )
1726 xmlFree( ctxt->uri );
1728 if ( ctxt->doc_buff != NULL ) {
1731 if ( ctxt->compression > 0 ) {
1732 xmlFreeZMemBuff( ctxt->doc_buff );
1737 xmlOutputBufferClose( ctxt->doc_buff );
1741 xmlFree( ctxt );
1791 xmlIOHTTPWriteCtxtPtr ctxt = NULL;
1796 ctxt = xmlMalloc(sizeof(xmlIOHTTPWriteCtxt));
1797 if (ctxt == NULL) {
1802 (void) memset(ctxt, 0, sizeof(xmlIOHTTPWriteCtxt));
1804 ctxt->uri = (char *) xmlStrdup((const xmlChar *)post_uri);
1805 if (ctxt->uri == NULL) {
1807 xmlFreeHTTPWriteCtxt(ctxt);
1820 ctxt->compression = compression;
1821 ctxt->doc_buff = xmlCreateZMemBuff(compression);
1827 ctxt->doc_buff = xmlAllocOutputBufferInternal(NULL);
1830 if (ctxt->doc_buff == NULL) {
1831 xmlFreeHTTPWriteCtxt(ctxt);
1832 ctxt = NULL;
1835 return (ctxt);
1888 xmlIOHTTPWriteCtxtPtr ctxt = context;
1890 if ( ( ctxt == NULL ) || ( ctxt->doc_buff == NULL ) || ( buffer == NULL ) )
1898 if ( ctxt->compression > 0 )
1899 len = xmlZMemBuffAppend( ctxt->doc_buff, buffer, len );
1903 len = xmlOutputBufferWrite( ctxt->doc_buff, len, buffer );
1911 ctxt->uri );
1949 xmlIOHTTPWriteCtxtPtr ctxt = context;
1956 if ( ( ctxt == NULL ) || ( http_mthd == NULL ) )
1963 if ( ctxt->compression > 0 ) {
1964 content_lgth = xmlZMemBuffGetContent( ctxt->doc_buff, &http_content );
1972 xmlOutputBufferPtr dctxt = ctxt->doc_buff;
1982 http_mthd, "data to URI", ctxt->uri );
1988 http_ctxt = xmlNanoHTTPMethod( ctxt->uri, http_mthd, http_content,
2003 http_mthd, ctxt->uri,
2054 "bytes to URI", ctxt->uri,
2066 xmlFreeHTTPWriteCtxt( ctxt );
2080 xmlIOHTTPClosePut( void * ctxt ) {
2081 return ( xmlIOHTTPCloseWrite( ctxt, "PUT" ) );
2094 xmlIOHTTPClosePost( void * ctxt ) {
2095 return ( xmlIOHTTPCloseWrite( ctxt, "POST" ) );
3760 * @ctxt: an XML parser context
3771 xmlCheckHTTPInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr ret) {
3785 __xmlLoaderErr(ctxt, "failed to load HTTP resource \"%s\"\n",
3788 __xmlLoaderErr(ctxt, "failed to load HTTP resource\n", NULL);
3802 xmlSwitchInputEncoding(ctxt, ret, handler);
3804 __xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
3862 ctxt: the context in which the entity is called or NULL
3872 xmlParserCtxtPtr ctxt) {
3886 if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
3889 resource = xmlCatalogLocalResolve(ctxt->catalogs,
3911 if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
3914 tmp = xmlCatalogLocalResolveURI(ctxt->catalogs, resource);
3938 * @ctxt: the context in which the entity is called or NULL
3946 xmlParserCtxtPtr ctxt)
3955 if ((ctxt != NULL) && (ctxt->options & XML_PARSE_NONET)) {
3956 int options = ctxt->options;
3958 ctxt->options -= XML_PARSE_NONET;
3959 ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
3960 ctxt->options = options;
3964 resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
3973 __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", ID);
3976 ret = xmlNewInputFromFile(ctxt, (const char *) resource);
4012 * @ctxt: the context in which the entity is called or NULL
4021 xmlParserCtxtPtr ctxt) {
4032 ret = xmlCurrentExternalEntityLoader(canonicFilename, ID, ctxt);
4036 return(xmlCurrentExternalEntityLoader(URL, ID, ctxt));
4049 * @ctxt: the context in which the entity is called or NULL
4058 xmlParserCtxtPtr ctxt) {
4063 resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
4078 input = xmlDefaultExternalEntityLoader((const char *) resource, ID, ctxt);