Home | History | Annotate | Download | only in libxml2

Lines Matching refs:ent

121                      xmlEntityPtr ent)
148 } else if (ent != NULL) {
152 size = ent->checked;
223 xmlAddEntityReference(xmlEntityPtr ent, xmlNodePtr firstNode,
2631 xmlEntityPtr ent;
2678 ent = xmlParseStringEntityRef(ctxt, &str);
2682 if (ent != NULL)
2683 ctxt->nbentities += ent->checked;
2684 if ((ent != NULL) &&
2685 (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
2686 if (ent->content != NULL) {
2687 COPY_BUF(0,buffer,nbchars,ent->content[0]);
2695 } else if ((ent != NULL) && (ent->content != NULL)) {
2697 rep = xmlStringDecodeEntities(ctxt, ent->content, what,
2707 if (xmlParserEntityCheck(ctxt, nbchars, ent))
2715 } else if (ent != NULL) {
2716 int i = xmlStrlen(ent->name);
2717 const xmlChar *cur = ent->name;
2731 ent = xmlParseStringPEReference(ctxt, &str);
2734 if (ent != NULL)
2735 ctxt->nbentities += ent->checked;
2736 if (ent != NULL) {
2737 if (ent->content == NULL) {
2738 xmlLoadEntityContent(ctxt, ent);
2741 rep = xmlStringDecodeEntities(ctxt, ent->content, what,
2750 if (xmlParserEntityCheck(ctxt, nbchars, ent))
3771 xmlEntityPtr ent;
3832 ent = xmlParseEntityRef(ctxt);
3834 if (ent != NULL)
3835 ctxt->nbentities += ent->owner;
3836 if ((ent != NULL) &&
3837 (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
3842 (ent->content[0] == '&')) {
3849 buf[len++] = ent->content[0];
3851 } else if ((ent != NULL) &&
3853 if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
3854 rep = xmlStringDecodeEntities(ctxt, ent->content,
3877 if (ent->content != NULL)
3878 buf[len++] = ent->content[0];
3880 } else if (ent != NULL) {
3881 int i = xmlStrlen(ent->name);
3882 const xmlChar *cur = ent->name;
3888 if ((ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
3889 (ent->content != NULL)) {
3890 rep = xmlStringDecodeEntities(ctxt, ent->content,
6835 xmlEntityPtr ent;
6893 ent = xmlParseEntityRef(ctxt);
6894 if (ent == NULL) return;
6897 was_checked = ent->checked;
6900 if ((ent->name == NULL) ||
6901 (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
6902 val = ent->content;
6915 * where the ent->children is filled with the result from
6918 if (ent->checked == 0) {
6938 if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
6940 ret = xmlParseBalancedChunkMemoryInternal(ctxt, ent->content,
6944 } else if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
6947 user_data, ctxt->depth, ent->URI,
6948 ent->ExternalID, &list);
6960 ent->checked = ctxt->nbentities - oldnbent;
6966 if (xmlParserEntityCheck(ctxt, 0, ent)) {
6972 if (((ent->etype == XML_INTERNAL_GENERAL_ENTITY) ||
6973 (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY))&&
6974 (ent->children == NULL)) {
6975 ent->children = list;
6984 list->parent = (xmlNodePtr) ent;
6986 ent->owner = 1;
6988 ent->owner = 0;
6993 ent->last = list;
6996 list = ent->children;
6998 if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
6999 xmlAddEntityReference(ent, list, NULL);
7003 ent->owner = 1;
7005 list->parent = (xmlNodePtr) ent;
7006 xmlSetTreeDoc(list, ent->doc);
7008 ent->last = list;
7019 "Entity '%s' failed to parse\n", ent->name);
7024 if (ent->checked == 0)
7025 ent->checked = 1;
7026 } else if (ent->checked != 1) {
7027 ctxt->nbentities += ent->checked;
7035 if (ent->children == NULL) {
7054 if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
7057 ent->content, user_data, NULL);
7059 } else if (ent->etype ==
7064 ent->URI, ent->ExternalID, NULL);
7082 ctxt->sax->reference(ctxt->userData, ent->name);
7095 ctxt->sax->reference(ctxt->userData, ent->name);
7099 ent->children == NULL)) {
7113 if ((ctxt->node != NULL) && (ent->children != NULL)) {
7121 if (((list == NULL) && (ent->owner == 0)) ||
7129 ent->owner = 1;
7132 cur = ent->children;
7143 if (cur == ent->last) {
7159 if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
7160 xmlAddEntityReference(ent, firstChild, nw);
7171 cur = ent->children;
7172 ent->children = NULL;
7173 last = ent->last;
7174 ent->last = NULL;
7186 xmlAddChild((xmlNodePtr) ent, nw);
7193 if (ent->owner == 0)
7194 ent->owner = 1;
7196 if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
7197 xmlAddEntityReference(ent, firstChild, nw);
7205 * would make ent->children a dangling pointer
7209 if (ent->children->type == XML_TEXT_NODE)
7210 ent->children->name = nbktext;
7211 if ((ent->last != ent->children) &&
7212 (ent->last->type == XML_TEXT_NODE))
7213 ent->last->name = nbktext;
7214 xmlAddChildList(ctxt->node, ent->children);
7259 xmlEntityPtr ent = NULL;
7282 ent = xmlGetPredefinedEntity(name);
7283 if (ent != NULL)
7284 return(ent);
7298 ent = ctxt->sax->getEntity(ctxt->userData, name);
7299 if ((ctxt->wellFormed == 1 ) && (ent == NULL) &&
7301 ent = xmlGetPredefinedEntity(name);
7302 if ((ctxt->wellFormed == 1 ) && (ent == NULL) &&
7304 ent = xmlSAX2GetEntity(ctxt, name);
7328 if (ent == NULL) {
7351 else if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
7362 (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
7373 (ent != NULL) && (ent->content != NULL) &&
7374 (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
7375 (xmlStrchr(ent->content, '<'))) {
7384 switch (ent->etype) {
7402 return(ent);
7441 xmlEntityPtr ent = NULL;
7471 ent = xmlGetPredefinedEntity(name);
7472 if (ent != NULL) {
7475 return(ent);
7490 ent = ctxt->sax->getEntity(ctxt->userData, name);
7491 if ((ent == NULL) && (ctxt->options & XML_PARSE_OLDSAX))
7492 ent = xmlGetPredefinedEntity(name);
7493 if ((ent == NULL) && (ctxt->userData==ctxt)) {
7494 ent = xmlSAX2GetEntity(ctxt, name);
7519 if (ent == NULL) {
7538 else if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
7549 (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
7560 (ent != NULL) && (ent->content != NULL) &&
7561 (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
7562 (xmlStrchr(ent->content, '<'))) {
7572 switch (ent->etype) {
7593 return(ent);
14101 * @ent : A valid entity
14108 xmlAddEntityReference(xmlEntityPtr ent, xmlNodePtr firstNode,
14112 (*xmlEntityRefFunc) (ent, firstNode, lastNode);