Lines Matching full:ctxt
128 xmlParserCtxtPtr ctxt; /* the parser context */
289 if ((reader != NULL) && (reader->ctxt != NULL))
290 dict = reader->ctxt->dict;
309 if ((reader != NULL) && (reader->ctxt != NULL) &&
310 (reader->ctxt->freeAttrsNr < 100)) {
311 cur->next = reader->ctxt->freeAttrs;
312 reader->ctxt->freeAttrs = cur;
313 reader->ctxt->freeAttrsNr++;
350 if ((reader != NULL) && (reader->ctxt != NULL))
351 dict = reader->ctxt->dict;
405 (reader != NULL) && (reader->ctxt != NULL) &&
406 (reader->ctxt->freeElemsNr < 100)) {
407 cur->next = reader->ctxt->freeElems;
408 reader->ctxt->freeElems = cur;
409 reader->ctxt->freeElemsNr++;
430 if ((reader != NULL) && (reader->ctxt != NULL))
431 dict = reader->ctxt->dict;
484 (reader != NULL) && (reader->ctxt != NULL) &&
485 (reader->ctxt->freeElemsNr < 100)) {
486 cur->next = reader->ctxt->freeElems;
487 reader->ctxt->freeElems = cur;
488 reader->ctxt->freeElemsNr++;
568 if ((reader == NULL) || (reader->ctxt == NULL)) {
580 reader->base, reader->cur, reader->ctxt->nodeNr);
666 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
667 xmlTextReaderPtr reader = ctxt->_private;
674 if ((ctxt->node != NULL) && (ctxt->input != NULL) &&
675 (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
676 (ctxt->input->cur[1] == '>'))
677 ctxt->node->extra = NODE_IS_EMPTY;
692 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
693 xmlTextReaderPtr reader = ctxt->_private;
729 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
730 xmlTextReaderPtr reader = ctxt->_private;
739 if ((ctxt->node != NULL) && (ctxt->input != NULL) &&
740 (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
741 (ctxt->input->cur[1] == '>'))
742 ctxt->node->extra = NODE_IS_EMPTY;
763 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
764 xmlTextReaderPtr reader = ctxt->_private;
786 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
787 xmlTextReaderPtr reader = ctxt->_private;
808 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
809 xmlTextReaderPtr reader = ctxt->_private;
860 (reader->ctxt->myDoc != NULL))
876 val = xmlParseChunk(reader->ctxt,
881 reader->ctxt->wellFormed = 0;
882 if (reader->ctxt->wellFormed == 0)
886 val = xmlParseChunk(reader->ctxt,
891 reader->ctxt->wellFormed = 0;
918 val = xmlParseChunk(reader->ctxt,
924 if (reader->ctxt->wellFormed)
925 reader->ctxt->wellFormed = 0;
932 if (reader->ctxt->wellFormed == 0) {
953 (reader->ctxt != NULL) && (reader->ctxt->validate == 1)) {
955 reader->ctxt->valid &= xmlValidatePushElement(&reader->ctxt->vctxt,
956 reader->ctxt->myDoc, node, node->name);
964 reader->ctxt->valid &= xmlValidatePushElement(&reader->ctxt->vctxt,
965 reader->ctxt->myDoc, node, qname);
978 reader->ctxt->myDoc,
990 reader->ctxt->myDoc,
1014 (reader->ctxt != NULL) && (reader->ctxt->validate == 1)) {
1015 reader->ctxt->valid &= xmlValidatePushCData(&reader->ctxt->vctxt,
1044 (reader->ctxt != NULL) && (reader->ctxt->validate == 1)) {
1046 reader->ctxt->valid &= xmlValidatePopElement(&reader->ctxt->vctxt,
1047 reader->ctxt->myDoc, node, node->name);
1055 reader->ctxt->valid &= xmlValidatePopElement(&reader->ctxt->vctxt,
1056 reader->ctxt->myDoc, node, qname);
1073 reader->ctxt->myDoc,
1093 xmlParserCtxtPtr ctxt = reader->ctxt;
1101 if ((node->children == NULL) && (ctxt->sax != NULL) &&
1102 (ctxt->sax->getEntity != NULL)) {
1104 ctxt->sax->getEntity(ctxt, node->name);
1213 if ((reader == NULL) || (reader->node == NULL) || (reader->ctxt == NULL))
1216 if (reader->ctxt->instate == XML_PARSER_EOF) return(1);
1220 if (reader->ctxt->nodeNr < reader->depth)
1302 if (reader->ctxt == NULL)
1321 } while ((reader->ctxt->node == NULL) &&
1324 if (reader->ctxt->node == NULL) {
1325 if (reader->ctxt->myDoc != NULL) {
1326 reader->node = reader->ctxt->myDoc->children;
1335 if (reader->ctxt->myDoc != NULL) {
1336 reader->node = reader->ctxt->myDoc->children;
1339 reader->node = reader->ctxt->nodeTab[0];
1343 reader->ctxt->parseMode = XML_PARSE_READER;
1347 olddepth = reader->ctxt->nodeNr;
1364 (reader->ctxt->nodeNr == olddepth) &&
1374 ((reader->ctxt->node == NULL) ||
1375 (reader->ctxt->node == reader->node) ||
1376 (reader->ctxt->node == reader->node->parent)) &&
1377 (reader->ctxt->instate != XML_PARSER_EOF)) {
1462 val = xmlParseChunk(reader->ctxt, "", 0, 1);
1524 reader->xincctxt = xmlXIncludeNewContext(reader->ctxt->myDoc);
1549 (reader->ctxt != NULL) && (reader->ctxt->replaceEntities == 1)) {
1554 if ((reader->node->children == NULL) && (reader->ctxt->sax != NULL) &&
1555 (reader->ctxt->sax->getEntity != NULL)) {
1557 reader->ctxt->sax->getEntity(reader->ctxt, reader->node->name);
1569 (reader->ctxt != NULL) && (reader->validate)) {
1651 if (reader->ctxt == NULL)
1841 if ((reader == NULL) || (reader->ctxt == NULL))
1843 if (reader->ctxt->wellFormed != 1)
1871 if ((reader == NULL) || (reader->ctxt == NULL))
1873 if (reader->ctxt->wellFormed != 1)
2141 ret->ctxt = xmlCreatePushParserCtxt(ret->sax, NULL,
2147 ret->ctxt = xmlCreatePushParserCtxt(ret->sax, NULL, NULL, 0, URI);
2152 if (ret->ctxt == NULL) {
2160 ret->ctxt->parseMode = XML_PARSE_READER;
2161 ret->ctxt->_private = ret;
2162 ret->ctxt->linenumbers = 1;
2163 ret->ctxt->dictNames = 1;
2168 ret->ctxt->docdict = 1;
2169 ret->dict = ret->ctxt->dict;
2203 if (ret->ctxt->directory == NULL)
2205 if ((ret->ctxt->directory == NULL) && (directory != NULL))
2206 ret->ctxt->directory = (char *) xmlStrdup((xmlChar *) directory);
2263 ctxt != NULL) {
2264 if (reader->dict == reader->ctxt->dict)
2266 if (reader->ctxt->myDoc != NULL) {
2268 xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
2269 reader->ctxt->myDoc = NULL;
2271 if ((reader->ctxt->vctxt.vstateTab != NULL) &&
2272 (reader->ctxt->vctxt.vstateMax > 0)){
2273 xmlFree(reader->ctxt->vctxt.vstateTab);
2274 reader->ctxt->vctxt.vstateTab = NULL;
2275 reader->ctxt->vctxt.vstateMax = 0;
2278 xmlFreeParserCtxt(reader->ctxt);
2314 if (reader->ctxt != NULL) {
2315 xmlStopParser(reader->ctxt);
2316 if (reader->ctxt->myDoc != NULL) {
2318 xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
2319 reader->ctxt->myDoc = NULL;
2523 if (reader->ctxt != NULL) {
2524 xmlStopParser(reader->ctxt);
2525 if (reader->ctxt->myDoc != NULL) {
2527 xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
2528 reader->ctxt->myDoc = NULL;
2940 else if (reader->ctxt != NULL)
2941 doc = reader->ctxt->myDoc;
3803 xmlParserCtxtPtr ctxt;
3805 if ((reader == NULL) || (reader->ctxt == NULL))
3807 ctxt = reader->ctxt;
3812 if (ctxt->loadsubset == 0) {
3815 ctxt->loadsubset = XML_DETECT_IDS;
3818 ctxt->loadsubset = 0;
3823 ctxt->loadsubset |= XML_COMPLETE_ATTRS;
3825 if (ctxt->loadsubset & XML_COMPLETE_ATTRS)
3826 ctxt->loadsubset -= XML_COMPLETE_ATTRS;
3831 ctxt->validate = 1;
3834 ctxt->validate = 0;
3839 ctxt->replaceEntities = 1;
3841 ctxt->replaceEntities = 0;
3860 xmlParserCtxtPtr ctxt;
3862 if ((reader == NULL) || (reader->ctxt == NULL))
3864 ctxt = reader->ctxt;
3868 if ((ctxt->loadsubset != 0) || (ctxt->validate != 0))
3872 if (ctxt->loadsubset & XML_COMPLETE_ATTRS)
3878 return(ctxt->replaceEntities);
3895 if ((reader == NULL) || (reader->ctxt == NULL) ||
3896 (reader->ctxt->input == NULL)) {
3899 return (reader->ctxt->input->line);
3913 if ((reader == NULL) || (reader->ctxt == NULL) ||
3914 (reader->ctxt->input == NULL)) {
3917 return (reader->ctxt->input->col);
4050 if ((reader->ctxt == NULL) || (reader->ctxt->myDoc == NULL))
4054 return(reader->ctxt->myDoc);
4061 xmlTextReaderValidityError(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
4064 xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
4119 xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error);
4219 if ((reader->ctxt != NULL) && (reader->ctxt->input != NULL)) {
4221 *file = reader->ctxt->input->filename;
4223 *line = reader->ctxt->input->line;
4307 &(reader->ctxt->sax),
4308 &(reader->ctxt->userData));
4340 * @ctxt: the RelaxNG schema validation context or NULL
4345 * If both @rng and @ctxt are NULL, then RelaxNG validation is deactivated.
4353 xmlRelaxNGValidCtxtPtr ctxt,
4359 if ((rng != NULL) && (ctxt != NULL))
4362 if (((rng != NULL) || (ctxt != NULL)) &&
4364 (reader->ctxt == NULL)))
4379 if ((rng == NULL) && (ctxt == NULL)) {
4413 reader->rngValidCtxt = ctxt;
4443 * @ctxt: the XML Schema validation context or NULL
4448 * If both @xsd and @ctxt are NULL then XML Schema validation is deactivated.
4456 xmlSchemaValidCtxtPtr ctxt,
4462 if ((xsd != NULL) && (ctxt != NULL))
4465 if (((xsd != NULL) || (ctxt != NULL)) &&
4467 (reader->ctxt == NULL)))
4486 if ((xsd == NULL) && (ctxt == NULL)) {
4512 &(reader->ctxt->sax),
4513 &(reader->ctxt->userData));
4523 reader->xsdValidCtxt = ctxt;
4526 &(reader->ctxt->sax),
4527 &(reader->ctxt->userData));
4562 * @ctxt: the XML Schema validation context or NULL
4567 * If @ctxt is NULL, then XML Schema validation is deactivated.
4574 xmlSchemaValidCtxtPtr ctxt,
4577 return(xmlTextReaderSchemaValidateInternal(reader, NULL, ctxt, options));
4601 * @ctxt: the RelaxNG schema validation context or NULL
4606 * If @ctxt is NULL, then RelaxNG schema validation is deactivated.
4613 xmlRelaxNGValidCtxtPtr ctxt,
4616 return(xmlTextReaderRelaxNGValidateInternal(reader, NULL, ctxt, options));
4684 else if (reader->ctxt != NULL)
4685 doc = reader->ctxt->myDoc;
4712 else if (reader->ctxt != NULL)
4713 doc = reader->ctxt->myDoc;
4837 xmlTextReaderGenericError(void *ctxt, xmlParserSeverities severity,
4840 xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt;
4853 xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error)
4855 xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt;
4865 xmlTextReaderError(void *ctxt, const char *msg, ...)
4870 xmlTextReaderGenericError(ctxt,
4878 xmlTextReaderWarning(void *ctxt, const char *msg, ...)
4883 xmlTextReaderGenericError(ctxt,
4890 xmlTextReaderValidityError(void *ctxt, const char *msg, ...)
4902 xmlTextReaderGenericError(ctxt,
4910 xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...)
4922 xmlTextReaderGenericError(ctxt,
4944 reader->ctxt->sax->error = xmlTextReaderError;
4945 reader->ctxt->sax->serror = NULL;
4946 reader->ctxt->vctxt.error = xmlTextReaderValidityError;
4947 reader->ctxt->sax->warning = xmlTextReaderWarning;
4948 reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning;
4972 reader->ctxt->sax->error = xmlParserError;
4973 reader->ctxt->vctxt.error = xmlParserValidityError;
4974 reader->ctxt->sax->warning = xmlParserWarning;
4975 reader->ctxt->vctxt.warning = xmlParserValidityWarning;
5011 reader->ctxt->sax->error = NULL;
5012 reader->ctxt->sax->serror = xmlTextReaderStructuredError;
5013 reader->ctxt->vctxt.error = xmlTextReaderValidityError;
5014 reader->ctxt->sax->warning = xmlTextReaderWarning;
5015 reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning;
5037 reader->ctxt->sax->error = xmlParserError;
5038 reader->ctxt->sax->serror = NULL;
5039 reader->ctxt->vctxt.error = xmlParserValidityError;
5040 reader->ctxt->sax->warning = xmlParserWarning;
5041 reader->ctxt->vctxt.warning = xmlParserValidityWarning;
5081 if ((reader->ctxt != NULL) && (reader->ctxt->validate == 1))
5082 return (reader->ctxt->valid);
5201 if (reader->ctxt == NULL) {
5203 reader->ctxt = xmlCreatePushParserCtxt(reader->sax, NULL,
5209 reader->ctxt =
5219 xmlCtxtReset(reader->ctxt);
5222 inputStream = xmlNewInputStream(reader->ctxt);
5236 inputPush(reader->ctxt, inputStream);
5239 if (reader->ctxt == NULL) {
5246 if (reader->ctxt->dict != NULL) {
5247 if (reader->dict != reader->ctxt->dict) {
5249 reader->dict = reader->ctxt->dict;
5252 reader->ctxt->dict = reader->dict;
5255 if (reader->ctxt->dict == NULL)
5256 reader->ctxt->dict = xmlDictCreate();
5257 reader->dict = reader->ctxt->dict;
5259 reader->ctxt->_private = reader;
5260 reader->ctxt->linenumbers = 1;
5261 reader->ctxt->dictNames = 1;
5265 reader->ctxt->docdict = 1;
5266 reader->ctxt->parseMode = XML_PARSE_READER;
5298 xmlCtxtUseOptions(reader->ctxt, options);
5304 xmlSwitchToEncoding(reader->ctxt, hdlr);
5306 if ((URL != NULL) && (reader->ctxt->input != NULL) &&
5307 (reader->ctxt->input->filename == NULL))
5308 reader->ctxt->input->filename = (char *)
5331 if ((reader == NULL) || (reader->ctxt == NULL))
5333 return(xmlByteConsumed(reader->ctxt));
5558 if (reader->ctxt != NULL) {
5559 xmlCtxtReset(reader->ctxt);
5573 if ((reader->ctxt != NULL) && (reader->ctxt->dict != NULL))
5574 reader->dict = reader->ctxt->dict;