Home | History | Annotate | Download | only in lib

Lines Matching defs:entity

328   XML_Bool hasMore; /* true if entity has not been completely processed */
329 /* An entity can be open while being already completely processed (hasMore ==
334 } ENTITY;
400 /* false once a parameter entity reference has been skipped */
432 ENTITY *entity;
440 XML_ACCOUNT_ENTITY_EXPANSION, /* intermediate bytes produced during entity
495 static enum XML_Error processEntity(XML_Parser parser, ENTITY *entity,
544 static enum XML_Error storeSelfEntityValue(XML_Parser parser, ENTITY *entity);
624 static void entityTrackingReportStats(XML_Parser parser, ENTITY *entity,
626 static void entityTrackingOnOpen(XML_Parser parser, ENTITY *entity,
628 static void entityTrackingOnClose(XML_Parser parser, ENTITY *entity,
733 ENTITY *m_declEntity;
1092 parsers (i.e. external entity parsers) will inherit it
1684 /* external parameter entity parsers share the DTD structure
2558 return XML_L("illegal parameter entity reference");
2560 return XML_L("undefined entity");
2562 return XML_L("recursive entity reference");
2564 return XML_L("asynchronous entity");
2568 return XML_L("reference to binary entity");
2570 return XML_L("reference to external entity in attribute");
2572 return XML_L("XML or text declaration not at start of entity");
2580 return XML_L("error in processing external entity reference");
2586 return XML_L("entity declared in parameter entity");
2598 return XML_L("incomplete markup in parameter entity");
2614 return XML_L("cannot suspend in external parameter entity");
3027 ENTITY *entity;
3049 entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
3052 if yes, check that the entity exists, and that it is internal,
3053 otherwise call the skipped entity or default handler.
3056 if (! entity)
3058 else if (! entity->is_internal)
3060 } else if (! entity) {
3067 if (entity->open)
3069 if (entity->notation)
3071 if (entity->textPtr) {
3075 parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
3081 result = processEntity(parser, entity, XML_FALSE, ENTITY_INTERNAL);
3086 entity->open = XML_TRUE;
3088 entity->open = XML_FALSE;
3092 parser->m_externalEntityRefHandlerArg, context, entity->base,
3093 entity->systemId, entity->publicId))
4217 if (parser->m_parentParser) { /* we are parsing an external entity */
4396 * from the internal entity processing, and IGNORE sections are an
4638 so we consider the external parameter entity read */
4681 /* found end of entity value - can store it now */
4690 * that to happen, a parameter entity parsing handler must have attempted
4809 /* found end of entity value - can store it now */
4983 parser->m_declEntity = (ENTITY *)lookup(
4984 parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
5048 ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
5049 externalSubsetName, sizeof(ENTITY));
5050 if (! entity) {
5053 * external entity parsing, so no allocation will happen
5059 entity->base = parser->m_curBase;
5062 parser->m_externalEntityRefHandlerArg, 0, entity->base,
5063 entity->systemId, entity->publicId))
5095 ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
5096 externalSubsetName, sizeof(ENTITY));
5097 if (! entity)
5099 entity->base = parser->m_curBase;
5102 parser->m_externalEntityRefHandlerArg, 0, entity->base,
5103 entity->systemId, entity->publicId))
5325 parser->m_declEntity = (ENTITY *)lookup(
5326 parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
5351 // This will store "&entity123;" in entity->textPtr
5403 parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
5404 name, sizeof(ENTITY));
5415 entity, then the entity declaration is not considered "internal"
5433 parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
5434 name, sizeof(ENTITY));
5445 entity, then the entity declaration is not considered "internal"
5625 ENTITY *entity;
5630 entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
5633 if yes, check that the entity exists, and that it is internal,
5634 otherwise call the skipped entity handler
5639 if (! entity)
5641 else if (! entity->is_internal) {
5648 * 'if' statement. That means the only entity in the hash
5650 * given as a parameter entity name in XML syntax, so the
5652 * the test for an internal entity.
5664 } else if (! entity) {
5674 if (entity->open)
5676 if (entity->textPtr) {
5680 result = processEntity(parser, entity, betweenDecl, ENTITY_INTERNAL);
5688 entity->open = XML_TRUE;
5689 entityTrackingOnOpen(parser, entity, __LINE__);
5691 parser->m_externalEntityRefHandlerArg, 0, entity->base,
5692 entity->systemId, entity->publicId)) {
5693 entityTrackingOnClose(parser, entity, __LINE__);
5694 entity->open = XML_FALSE;
5697 entityTrackingOnClose(parser, entity, __LINE__);
5698 entity->open = XML_FALSE;
5978 processEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl,
6016 entity->open = XML_TRUE;
6017 entity->hasMore = XML_TRUE;
6019 entityTrackingOnOpen(parser, entity, __LINE__);
6021 entity->processed = 0;
6024 openEntity->entity = entity;
6032 // therefore no need to set it for other entity types
6045 ENTITY *entity;
6053 entity = openEntity->entity;
6056 if (entity->hasMore) {
6057 textStart = ((const char *)entity->textPtr) + entity->processed;
6058 textEnd = (const char *)(entity->textPtr + entity->textLen);
6062 if (entity->is_param) {
6076 // Check if entity is complete, if not, mark down how much of it is
6082 entity->processed = (int)(next - (const char *)entity->textPtr);
6086 // Entity is complete. We cannot close it here since we need to first
6089 entity->hasMore = XML_FALSE;
6092 } // End of entity processing, "if" block will return here
6094 // Remove fully processed openEntity from open entity list.
6096 entityTrackingOnClose(parser, entity, __LINE__);
6103 entity->open = XML_FALSE;
6111 parser->m_processor = entity->is_param ? prologProcessor : contentProcessor;
6142 ENTITY *const entity = openEntity->entity;
6144 = ((const char *)entity->textPtr) + entity->processed;
6146 = (const char *)(entity->textPtr + entity->textLen);
6149 if (entity->hasMore) {
6155 // Check if entity is complete, if not, mark down how much of it is
6159 entity->processed
6160 = (int)(nextInEntity - (const char *)entity->textPtr);
6164 // Entity is complete. We cannot close it here since we need to first
6167 entity->hasMore = XML_FALSE;
6169 } // End of entity processing, "if" block skips the rest
6171 // Remove fully processed openEntity from open entity list.
6173 entityTrackingOnClose(parser, entity, __LINE__);
6180 entity->open = XML_FALSE;
6279 ENTITY *entity;
6301 entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
6304 if yes, check that the entity exists, and that it is internal.
6316 if (! entity)
6318 else if (! entity->is_internal)
6320 } else if (! entity) {
6321 /* Cannot report skipped entity here - see comments on
6333 if (entity->open) {
6337 * The "if (entity->open)" check catches recursive entity
6339 * entity, it must have gone through this code before and
6346 * here with entity->open being TRUE.
6356 if (entity->notation) {
6361 if (! entity->textPtr) {
6367 result = processEntity(parser, entity, XML_FALSE, ENTITY_ATTRIBUTE);
6377 * Getting that would require an entity name to contain an
6411 since this would indicate an external entity; therefore we
6436 ENTITY *entity;
6444 entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
6446 if (! entity) {
6447 /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
6448 /* cannot report skipped entity here - see comments on
6456 if (entity->open || (entity == parser->m_declEntity)) {
6462 if (entity->systemId) {
6465 entity->open = XML_TRUE;
6466 entityTrackingOnOpen(parser, entity, __LINE__);
6468 parser->m_externalEntityRefHandlerArg, 0, entity->base,
6469 entity->systemId, entity->publicId)) {
6470 entityTrackingOnClose(parser, entity, __LINE__);
6471 entity->open = XML_FALSE;
6475 entityTrackingOnClose(parser, entity, __LINE__);
6476 entity->open = XML_FALSE;
6482 result = processEntity(parser, entity, XML_FALSE, ENTITY_VALUE);
6489 within markup declarations, e.g entity values in this case. */
6593 ENTITY *const entity = openEntity->entity;
6595 = ((const char *)entity->textPtr) + entity->processed;
6597 = (const char *)(entity->textPtr + entity->textLen);
6600 if (entity->hasMore) {
6606 // Check if entity is complete, if not, mark down how much of it is
6610 entity->processed
6611 = (int)(nextInEntity - (const char *)entity->textPtr);
6615 // Entity is complete. We cannot close it here since we need to first
6618 entity->hasMore = XML_FALSE;
6620 } // End of entity processing, "if" block skips the rest
6622 // Remove fully processed openEntity from open entity list.
6624 entityTrackingOnClose(parser, entity, __LINE__);
6631 entity->open = XML_FALSE;
6652 storeSelfEntityValue(XML_Parser parser, ENTITY *entity) {
6653 // This will store "&entity123;" in entity->textPtr
6660 || ! poolAppendString(pool, entity->name)
6666 entity->textPtr = poolStart(pool);
6667 entity->textLen = (int)(poolLength(pool));
6761 * entity, already converted to internal format). This by
7021 ENTITY *e = (ENTITY *)hashTableIterNext(&iter);
7050 ENTITY *e;
7053 e = (ENTITY *)lookup(parser, &dtd->generalEntities,
7336 /* Copy the entity tables. */
7373 ENTITY *newE;
7375 const ENTITY *oldE = (ENTITY *)hashTableIterNext(&iter);
7381 newE = (ENTITY *)lookup(oldParser, newTable, name, sizeof(ENTITY));
7671 * place to copy the text of a simple general entity. By that
7672 * point, the name of the entity is already stored in the pool, so
8090 const size_t lenOfShortestInclude = sizeof("<!ENTITY a SYSTEM 'b'>") - 1;
8236 entityTrackingReportStats(XML_Parser rootParser, ENTITY *entity,
8245 const char *const entityName = entity->name;
8255 entity->is_param ? "%" : "&", entityName, action, entity->textLen,
8260 entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
8271 entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
8275 entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
8279 entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);