Lines Matching refs:c_ctxt
113 cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt): argument
114 _ParserContext._initParserContext(self, c_ctxt)
116 self._connectTarget(c_ctxt)
118 self._connectEvents(c_ctxt)
120 cdef void _connectTarget(self, xmlparser.xmlParserCtxt* c_ctxt): argument
123 sax = c_ctxt.sax
164 c_ctxt.replaceEntities = 1
166 cdef void _connectEvents(self, xmlparser.xmlParserCtxt* c_ctxt): argument
169 sax = c_ctxt.sax
175 if self._event_filter == 0 or c_ctxt.html or \
183 if self._event_filter == 0 or c_ctxt.html or \
242 cdef void _handleSaxException(self, xmlparser.xmlParserCtxt* c_ctxt): argument
243 if c_ctxt.errNo == xmlerror.XML_ERR_OK:
244 c_ctxt.errNo = xmlerror.XML_ERR_INTERNAL_ERROR
246 c_ctxt.wellFormed = 0
247 c_ctxt.disableSAX = 1
248 c_ctxt.instate = xmlparser.XML_PARSER_EOF
300 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
301 if c_ctxt._private is NULL or c_ctxt.disableSAX:
303 context = <_SaxParserContext>c_ctxt._private
317 context._origSaxStart(c_ctxt, c_localname, c_prefix, c_namespace,
320 if c_ctxt.html:
321 _fixHtmlDictNodeNames(c_ctxt.dict, c_ctxt.node)
327 _pushSaxStartEvent(context, c_ctxt, c_namespace, c_localname, None)
329 context._handleSaxException(c_ctxt)
342 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
343 if c_ctxt._private is NULL or c_ctxt.disableSAX:
345 context = <_SaxParserContext>c_ctxt._private
370 if c_ctxt.loadsubset & xmlparser.XML_COMPLETE_ATTRS == 0:
390 context, c_ctxt,
401 _pushSaxStartEvent(context, c_ctxt, c_namespace,
404 context._handleSaxException(c_ctxt)
411 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
412 if c_ctxt._private is NULL or c_ctxt.disableSAX:
414 context = <_SaxParserContext>c_ctxt._private
416 context._origSaxStartNoNs(c_ctxt, c_name, c_attributes)
417 if c_ctxt.html:
418 _fixHtmlDictNodeNames(c_ctxt.dict, c_ctxt.node)
421 _pushSaxStartEvent(context, c_ctxt, NULL, c_name, None)
423 context._handleSaxException(c_ctxt)
430 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
431 if c_ctxt._private is NULL or c_ctxt.disableSAX:
433 context = <_SaxParserContext>c_ctxt._private
444 context, c_ctxt, funicode(c_name),
448 _pushSaxStartEvent(context, c_ctxt, NULL, c_name, element)
450 context._handleSaxException(c_ctxt)
456 xmlparser.xmlParserCtxt* c_ctxt, argument
459 if element is not None and c_ctxt.input is not NULL:
462 <unsigned short>c_ctxt.input.line
463 if c_ctxt.input.line < 65535 else 65535)
468 xmlparser.xmlParserCtxt* c_ctxt, argument
475 node = _elementFactory(context._doc, c_ctxt.node)
487 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
488 if c_ctxt._private is NULL or c_ctxt.disableSAX:
490 context = <_SaxParserContext>c_ctxt._private
499 context._origSaxEnd(c_ctxt, c_localname, c_prefix, c_namespace)
504 context._handleSaxException(c_ctxt)
510 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
511 if c_ctxt._private is NULL or c_ctxt.disableSAX:
513 context = <_SaxParserContext>c_ctxt._private
518 context._origSaxEndNoNs(c_ctxt, c_name)
522 context._handleSaxException(c_ctxt)
563 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
564 if c_ctxt._private is NULL or c_ctxt.disableSAX:
566 context = <_SaxParserContext>c_ctxt._private
571 context._handleSaxException(c_ctxt)
580 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
581 if c_ctxt._private is NULL or c_ctxt.disableSAX:
583 context = <_SaxParserContext>c_ctxt._private
590 context._handleSaxException(c_ctxt)
596 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
597 if c_ctxt._private is NULL or c_ctxt.disableSAX:
599 context = <_SaxParserContext>c_ctxt._private
601 c_doc = c_ctxt.myDoc
605 context._handleSaxException(c_ctxt)
613 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
614 if c_ctxt._private is NULL or c_ctxt.disableSAX:
616 context = <_SaxParserContext>c_ctxt._private
624 context._handleSaxException(c_ctxt)
632 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
633 if c_ctxt._private is NULL or c_ctxt.disableSAX:
635 context = <_SaxParserContext>c_ctxt._private
637 c_node = _findLastEventNode(c_ctxt)
643 context._handleSaxException(c_ctxt)
650 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
651 if c_ctxt._private is NULL or c_ctxt.disableSAX:
653 context = <_SaxParserContext>c_ctxt._private
659 context._handleSaxException(c_ctxt)
666 c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
667 if c_ctxt._private is NULL or c_ctxt.disableSAX:
669 context = <_SaxParserContext>c_ctxt._private
671 c_node = _findLastEventNode(c_ctxt)
677 context._handleSaxException(c_ctxt)
682 cdef inline xmlNode* _findLastEventNode(xmlparser.xmlParserCtxt* c_ctxt): argument
684 if c_ctxt.inSubset == 1:
685 return c_ctxt.myDoc.intSubset.last
686 elif c_ctxt.inSubset == 2:
687 return c_ctxt.myDoc.extSubset.last
688 elif c_ctxt.node is NULL:
689 return c_ctxt.myDoc.last
690 elif c_ctxt.node.type == tree.XML_ELEMENT_NODE:
691 return c_ctxt.node.last
693 return c_ctxt.node.next