Lines Matching refs:myDoc
290 if ((ctx == NULL) || (ctxt->myDoc == NULL)) return(0); in xmlSAX2IsStandalone()
291 return(ctxt->myDoc->standalone == 1); in xmlSAX2IsStandalone()
306 if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); in xmlSAX2HasInternalSubset()
307 return(ctxt->myDoc->intSubset != NULL); in xmlSAX2HasInternalSubset()
322 if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0); in xmlSAX2HasExternalSubset()
323 return(ctxt->myDoc->extSubset != NULL); in xmlSAX2HasExternalSubset()
348 if (ctxt->myDoc == NULL) in xmlSAX2InternalSubset()
350 dtd = xmlGetIntSubset(ctxt->myDoc); in xmlSAX2InternalSubset()
356 ctxt->myDoc->intSubset = NULL; in xmlSAX2InternalSubset()
358 ctxt->myDoc->intSubset = in xmlSAX2InternalSubset()
359 xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID); in xmlSAX2InternalSubset()
360 if (ctxt->myDoc->intSubset == NULL) in xmlSAX2InternalSubset()
386 (ctxt->wellFormed && ctxt->myDoc))) { in xmlSAX2ExternalSubset()
408 xmlNewDtd(ctxt->myDoc, name, ExternalID, SystemID); in xmlSAX2ExternalSubset()
545 if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) { in xmlSAX2GetEntity()
547 ctxt->myDoc->standalone = 0; in xmlSAX2GetEntity()
548 ret = xmlGetDocEntity(ctxt->myDoc, name); in xmlSAX2GetEntity()
549 ctxt->myDoc->standalone = 1; in xmlSAX2GetEntity()
551 ret = xmlGetDocEntity(ctxt->myDoc, name); in xmlSAX2GetEntity()
553 ctxt->myDoc->standalone = 0; in xmlSAX2GetEntity()
554 ret = xmlGetDocEntity(ctxt->myDoc, name); in xmlSAX2GetEntity()
560 ctxt->myDoc->standalone = 1; in xmlSAX2GetEntity()
564 ret = xmlGetDocEntity(ctxt->myDoc, name); in xmlSAX2GetEntity()
616 ret = xmlGetParameterEntity(ctxt->myDoc, name); in xmlSAX2GetParameterEntity()
646 ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId, in xmlSAX2EntityDecl()
665 ent = xmlAddDtdEntity(ctxt->myDoc, name, type, publicId, in xmlSAX2EntityDecl()
711 if ((ctxt == NULL) || (ctxt->myDoc == NULL)) in xmlSAX2AttributeDecl()
733 attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, elem, in xmlSAX2AttributeDecl()
737 attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem, in xmlSAX2AttributeDecl()
751 (ctxt->myDoc->intSubset != NULL)) in xmlSAX2AttributeDecl()
752 ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2AttributeDecl()
777 if ((ctxt == NULL) || (ctxt->myDoc == NULL)) in xmlSAX2ElementDecl()
786 elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, in xmlSAX2ElementDecl()
789 elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, in xmlSAX2ElementDecl()
801 ctxt->myDoc && ctxt->myDoc->intSubset) in xmlSAX2ElementDecl()
803 xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); in xmlSAX2ElementDecl()
823 if ((ctxt == NULL) || (ctxt->myDoc == NULL)) in xmlSAX2NotationDecl()
837 nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, in xmlSAX2NotationDecl()
840 nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name, in xmlSAX2NotationDecl()
851 (ctxt->myDoc->intSubset != NULL)) in xmlSAX2NotationDecl()
852 ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2NotationDecl()
881 ent = xmlAddDocEntity(ctxt->myDoc, name, in xmlSAX2UnparsedEntityDecl()
901 ent = xmlAddDtdEntity(ctxt->myDoc, name, in xmlSAX2UnparsedEntityDecl()
965 if (ctxt->myDoc == NULL) in xmlSAX2StartDocument()
966 ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL); in xmlSAX2StartDocument()
967 ctxt->myDoc->properties = XML_DOC_HTML; in xmlSAX2StartDocument()
968 ctxt->myDoc->parseFlags = ctxt->options; in xmlSAX2StartDocument()
969 if (ctxt->myDoc == NULL) { in xmlSAX2StartDocument()
982 doc = ctxt->myDoc = xmlNewDoc(ctxt->version); in xmlSAX2StartDocument()
1002 if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) && in xmlSAX2StartDocument()
1004 ctxt->myDoc->URL = xmlPathToURI((const xmlChar *)ctxt->input->filename); in xmlSAX2StartDocument()
1005 if (ctxt->myDoc->URL == NULL) in xmlSAX2StartDocument()
1027 ctxt->myDoc && ctxt->myDoc->intSubset) in xmlSAX2EndDocument()
1028 ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc); in xmlSAX2EndDocument()
1034 if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) && in xmlSAX2EndDocument()
1035 (ctxt->myDoc->encoding == NULL)) { in xmlSAX2EndDocument()
1036 ctxt->myDoc->encoding = ctxt->encoding; in xmlSAX2EndDocument()
1041 (ctxt->inputTab[0]->encoding != NULL) && (ctxt->myDoc != NULL) && in xmlSAX2EndDocument()
1042 (ctxt->myDoc->encoding == NULL)) { in xmlSAX2EndDocument()
1043 ctxt->myDoc->encoding = xmlStrdup(ctxt->inputTab[0]->encoding); in xmlSAX2EndDocument()
1045 if ((ctxt->charset != XML_CHAR_ENCODING_NONE) && (ctxt->myDoc != NULL) && in xmlSAX2EndDocument()
1046 (ctxt->myDoc->charset == XML_CHAR_ENCODING_NONE)) { in xmlSAX2EndDocument()
1047 ctxt->myDoc->charset = ctxt->charset; in xmlSAX2EndDocument()
1124 ctxt->myDoc, ctxt->node, in xmlSAX2AttributeInternal()
1181 ctxt->myDoc && ctxt->myDoc->intSubset) in xmlSAX2AttributeInternal()
1182 ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2AttributeInternal()
1244 ctxt->myDoc && ctxt->myDoc->intSubset) in xmlSAX2AttributeInternal()
1245 ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2AttributeInternal()
1258 namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns); in xmlSAX2AttributeInternal()
1295 ret->children = xmlStringGetNodeList(ctxt->myDoc, value); in xmlSAX2AttributeInternal()
1304 ret->children = xmlNewDocText(ctxt->myDoc, value); in xmlSAX2AttributeInternal()
1313 ctxt->myDoc && ctxt->myDoc->intSubset) { in xmlSAX2AttributeInternal()
1329 ctxt->myDoc, ctxt->node, ret, value); in xmlSAX2AttributeInternal()
1338 nvalnorm = xmlValidNormalizeAttributeValue(ctxt->myDoc, in xmlSAX2AttributeInternal()
1346 ctxt->myDoc, ctxt->node, ret, val); in xmlSAX2AttributeInternal()
1350 ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2AttributeInternal()
1373 xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret); in xmlSAX2AttributeInternal()
1374 } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) in xmlSAX2AttributeInternal()
1375 xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret); in xmlSAX2AttributeInternal()
1376 else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) in xmlSAX2AttributeInternal()
1377 xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret); in xmlSAX2AttributeInternal()
1400 elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->intSubset, name, prefix); in xmlCheckDefaultedAttributes()
1402 elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, name, prefix); in xmlCheckDefaultedAttributes()
1414 if ((ctxt->myDoc->standalone == 1) && in xmlCheckDefaultedAttributes()
1415 (ctxt->myDoc->extSubset != NULL) && in xmlCheckDefaultedAttributes()
1419 (xmlGetDtdQAttrDesc(ctxt->myDoc->extSubset, in xmlCheckDefaultedAttributes()
1422 (xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset, in xmlCheckDefaultedAttributes()
1492 tst = xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset, in xmlCheckDefaultedAttributes()
1532 elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, in xmlCheckDefaultedAttributes()
1561 if ((ctx == NULL) || (fullname == NULL) || (ctxt->myDoc == NULL)) return; in xmlSAX2StartElement()
1571 if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && in xmlSAX2StartElement()
1572 ((ctxt->myDoc->intSubset == NULL) || in xmlSAX2StartElement()
1573 ((ctxt->myDoc->intSubset->notations == NULL) && in xmlSAX2StartElement()
1574 (ctxt->myDoc->intSubset->elements == NULL) && in xmlSAX2StartElement()
1575 (ctxt->myDoc->intSubset->attributes == NULL) && in xmlSAX2StartElement()
1576 (ctxt->myDoc->intSubset->entities == NULL)))) { in xmlSAX2StartElement()
1594 ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, name, NULL); in xmlSAX2StartElement()
1601 if (ctxt->myDoc->children == NULL) { in xmlSAX2StartElement()
1605 xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); in xmlSAX2StartElement()
1607 parent = ctxt->myDoc->children; in xmlSAX2StartElement()
1651 ((ctxt->myDoc->intSubset != NULL) || in xmlSAX2StartElement()
1652 (ctxt->myDoc->extSubset != NULL))) { in xmlSAX2StartElement()
1679 ns = xmlSearchNs(ctxt->myDoc, ret, prefix); in xmlSAX2StartElement()
1681 ns = xmlSearchNs(ctxt->myDoc, parent, prefix); in xmlSAX2StartElement()
1733 chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); in xmlSAX2StartElement()
1738 ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); in xmlSAX2StartElement()
1782 ctxt->myDoc && ctxt->myDoc->intSubset) in xmlSAX2EndElement()
1783 ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2EndElement()
1937 namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, prefix); in xmlSAX2AttributeNs()
1950 ret->doc = ctxt->myDoc; in xmlSAX2AttributeNs()
2000 ret->children = xmlStringLenGetNodeList(ctxt->myDoc, value, in xmlSAX2AttributeNs()
2025 ctxt->myDoc && ctxt->myDoc->intSubset) { in xmlSAX2AttributeNs()
2035 ctxt->myDoc, ctxt->node, ret, value); in xmlSAX2AttributeNs()
2045 ctxt->myDoc, ctxt->node, ret, dup); in xmlSAX2AttributeNs()
2064 &ctxt->vctxt, ctxt->myDoc, in xmlSAX2AttributeNs()
2079 ctxt->myDoc, ctxt->node, ret, dup); in xmlSAX2AttributeNs()
2089 ctxt->myDoc, ctxt->node, ret, dup); in xmlSAX2AttributeNs()
2117 xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret); in xmlSAX2AttributeNs()
2118 } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) { in xmlSAX2AttributeNs()
2122 xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret); in xmlSAX2AttributeNs()
2123 } else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) { in xmlSAX2AttributeNs()
2126 xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret); in xmlSAX2AttributeNs()
2174 if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && in xmlSAX2StartElementNs()
2175 ((ctxt->myDoc->intSubset == NULL) || in xmlSAX2StartElementNs()
2176 ((ctxt->myDoc->intSubset->notations == NULL) && in xmlSAX2StartElementNs()
2177 (ctxt->myDoc->intSubset->elements == NULL) && in xmlSAX2StartElementNs()
2178 (ctxt->myDoc->intSubset->attributes == NULL) && in xmlSAX2StartElementNs()
2179 (ctxt->myDoc->intSubset->entities == NULL)))) { in xmlSAX2StartElementNs()
2225 ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, in xmlSAX2StartElementNs()
2228 ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL); in xmlSAX2StartElementNs()
2230 ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, in xmlSAX2StartElementNs()
2246 if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { in xmlSAX2StartElementNs()
2247 xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); in xmlSAX2StartElementNs()
2275 ctxt->myDoc && ctxt->myDoc->intSubset) { in xmlSAX2StartElementNs()
2276 ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc, in xmlSAX2StartElementNs()
2311 ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix); in xmlSAX2StartElementNs()
2313 ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix); in xmlSAX2StartElementNs()
2376 chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); in xmlSAX2StartElementNs()
2381 ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); in xmlSAX2StartElementNs()
2420 ctxt->myDoc && ctxt->myDoc->intSubset) in xmlSAX2EndElementNs()
2421 ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, cur); in xmlSAX2EndElementNs()
2449 ret = xmlNewCharRef(ctxt->myDoc, name); in xmlSAX2Reference()
2451 ret = xmlNewReference(ctxt->myDoc, name); in xmlSAX2Reference()
2626 ret = xmlNewDocPI(ctxt->myDoc, target, data); in xmlSAX2ProcessingInstruction()
2638 xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); in xmlSAX2ProcessingInstruction()
2641 xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); in xmlSAX2ProcessingInstruction()
2644 if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { in xmlSAX2ProcessingInstruction()
2649 xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); in xmlSAX2ProcessingInstruction()
2687 ret = xmlNewDocComment(ctxt->myDoc, value); in xmlSAX2Comment()
2699 xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); in xmlSAX2Comment()
2702 xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); in xmlSAX2Comment()
2705 if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { in xmlSAX2Comment()
2710 xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); in xmlSAX2Comment()
2757 ret = xmlNewCDataBlock(ctxt->myDoc, value, len); in xmlSAX2CDataBlock()