Lines Matching refs:dtd

530              DTD *dtd);
923 DTD *dtd) in parserCreate() argument
980 if (dtd) in parserCreate()
981 parser->m_dtd = dtd; in parserCreate()
2687 DTD * const dtd = parser->m_dtd; in doContent() local
2768 name = poolStoreString(&dtd->pool, enc, in doContent()
2773 entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0); in doContent()
2774 poolDiscard(&dtd->pool); in doContent()
2779 if (!dtd->hasParamEntityRefs || dtd->standalone) { in doContent()
3178 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in storeAtts() local
3192 elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str,0); in storeAtts()
3194 const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str); in storeAtts()
3197 elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name, in storeAtts()
3403 id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0); in storeAtts()
3513 else if (dtd->defaultPrefix.binding) { in storeAtts()
3514 binding = dtd->defaultPrefix.binding; in storeAtts()
4331 DTD * const dtd = parser->m_dtd; in doProlog() local
4439 &dtd->paramEntities, in doProlog()
4445 dtd->hasParamEntityRefs = XML_TRUE; in doProlog()
4466 if (dtd->keepProcessing && parser->m_declEntity) { in doProlog()
4467 XML_Char *tem = poolStoreString(&dtd->pool, in doProlog()
4475 poolFinish(&dtd->pool); in doProlog()
4496 XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs; in doProlog()
4497 dtd->hasParamEntityRefs = XML_TRUE; in doProlog()
4500 &dtd->paramEntities, in doProlog()
4513 dtd->paramEntityRead = XML_FALSE; in doProlog()
4520 if (dtd->paramEntityRead) { in doProlog()
4521 if (!dtd->standalone && in doProlog()
4530 dtd->hasParamEntityRefs = hadParamEntityRefs; in doProlog()
4547 XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs; in doProlog()
4548 dtd->hasParamEntityRefs = XML_TRUE; in doProlog()
4550 ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities, in doProlog()
4556 dtd->paramEntityRead = XML_FALSE; in doProlog()
4563 if (dtd->paramEntityRead) { in doProlog()
4564 if (!dtd->standalone && in doProlog()
4573 dtd->hasParamEntityRefs = hadParamEntityRefs; in doProlog()
4619 if (dtd->keepProcessing && parser->m_attlistDeclHandler) in doProlog()
4624 if (dtd->keepProcessing && parser->m_attlistDeclHandler) { in doProlog()
4644 if (dtd->keepProcessing) { in doProlog()
4671 if (dtd->keepProcessing) { in doProlog()
4677 &dtd->pool); in doProlog()
4680 attVal = poolStart(&dtd->pool); in doProlog()
4681 poolFinish(&dtd->pool); in doProlog()
4708 if (dtd->keepProcessing) { in doProlog()
4713 parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool); in doProlog()
4714 parser->m_declEntity->textLen = (int)(poolLength(&dtd->entityValuePool)); in doProlog()
4715 poolFinish(&dtd->entityValuePool); in doProlog()
4728 poolDiscard(&dtd->entityValuePool); in doProlog()
4737 dtd->hasParamEntityRefs = XML_TRUE; in doProlog()
4753 if (!dtd->standalone in doProlog()
4765 &dtd->paramEntities, in doProlog()
4775 if (dtd->keepProcessing && parser->m_declEntity) { in doProlog()
4776 parser->m_declEntity->systemId = poolStoreString(&dtd->pool, enc, in doProlog()
4782 poolFinish(&dtd->pool); in doProlog()
4791 if (dtd->keepProcessing && parser->m_declEntity && parser->m_entityDeclHandler) { in doProlog()
4805 if (dtd->keepProcessing && parser->m_declEntity) { in doProlog()
4806 parser->m_declEntity->notation = poolStoreString(&dtd->pool, enc, s, next); in doProlog()
4809 poolFinish(&dtd->pool); in doProlog()
4839 if (dtd->keepProcessing) { in doProlog()
4840 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next); in doProlog()
4843 parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, in doProlog()
4848 poolDiscard(&dtd->pool); in doProlog()
4852 poolFinish(&dtd->pool); in doProlog()
4864 poolDiscard(&dtd->pool); in doProlog()
4871 if (dtd->keepProcessing) { in doProlog()
4872 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next); in doProlog()
4875 parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities, in doProlog()
4880 poolDiscard(&dtd->pool); in doProlog()
4884 poolFinish(&dtd->pool); in doProlog()
4896 poolDiscard(&dtd->pool); in doProlog()
4997 if (dtd->scaffIndex) { in doProlog()
4998 int *temp = (int *)REALLOC(parser, dtd->scaffIndex, in doProlog()
5002 dtd->scaffIndex = temp; in doProlog()
5014 if (dtd->in_eldecl) { in doProlog()
5018 dtd->scaffIndex[dtd->scaffLevel] = myindex; in doProlog()
5019 dtd->scaffLevel++; in doProlog()
5020 dtd->scaffold[myindex].type = XML_CTYPE_SEQ; in doProlog()
5029 if (dtd->in_eldecl && parser->m_elementDeclHandler) in doProlog()
5035 if (dtd->in_eldecl in doProlog()
5037 && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type in doProlog()
5040 dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type in doProlog()
5050 dtd->hasParamEntityRefs = XML_TRUE; in doProlog()
5052 dtd->keepProcessing = dtd->standalone; in doProlog()
5056 name = poolStoreString(&dtd->pool, enc, in doProlog()
5061 entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0); in doProlog()
5062 poolDiscard(&dtd->pool); in doProlog()
5068 (dtd->standalone in doProlog()
5070 : !dtd->hasParamEntityRefs)) { in doProlog()
5098 dtd->keepProcessing = dtd->standalone; in doProlog()
5119 dtd->paramEntityRead = XML_FALSE; in doProlog()
5131 if (!dtd->paramEntityRead) { in doProlog()
5132 dtd->keepProcessing = dtd->standalone; in doProlog()
5137 dtd->keepProcessing = dtd->standalone; in doProlog()
5142 if (!dtd->standalone && in doProlog()
5155 dtd->scaffLevel = 0; in doProlog()
5156 dtd->scaffCount = 0; in doProlog()
5157 dtd->in_eldecl = XML_TRUE; in doProlog()
5164 if (dtd->in_eldecl) { in doProlog()
5180 dtd->in_eldecl = XML_FALSE; in doProlog()
5185 if (dtd->in_eldecl) { in doProlog()
5186 dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type in doProlog()
5205 if (dtd->in_eldecl) { in doProlog()
5215 dtd->scaffold[myindex].type = XML_CTYPE_NAME; in doProlog()
5216 dtd->scaffold[myindex].quant = quant; in doProlog()
5221 dtd->scaffold[myindex].name = name; in doProlog()
5224 dtd->contentStringLen += nameLen; in doProlog()
5242 if (dtd->in_eldecl) { in doProlog()
5245 dtd->scaffLevel--; in doProlog()
5246 dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant; in doProlog()
5247 if (dtd->scaffLevel == 0) { in doProlog()
5255 dtd->in_eldecl = XML_FALSE; in doProlog()
5256 dtd->contentStringLen = 0; in doProlog()
5284 if (dtd->keepProcessing && parser->m_entityDeclHandler) in doProlog()
5292 if (dtd->keepProcessing && parser->m_attlistDeclHandler) in doProlog()
5537 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in appendAttributeValue() local
5614 entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0); in appendAttributeValue()
5619 if (pool == &dtd->pool) /* are we called from prolog? */ in appendAttributeValue()
5624 (dtd->standalone in appendAttributeValue()
5626 : !dtd->hasParamEntityRefs); in appendAttributeValue()
5628 checkEntityDecl = !dtd->hasParamEntityRefs || dtd->standalone; in appendAttributeValue()
5722 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in storeEntityValue() local
5723 STRING_POOL *pool = &(dtd->entityValuePool); in storeEntityValue()
5753 entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0); in storeEntityValue()
5762 dtd->keepProcessing = dtd->standalone; in storeEntityValue()
5773 dtd->paramEntityRead = XML_FALSE; in storeEntityValue()
5785 if (!dtd->paramEntityRead) in storeEntityValue()
5786 dtd->keepProcessing = dtd->standalone; in storeEntityValue()
5789 dtd->keepProcessing = dtd->standalone; in storeEntityValue()
6062 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in setElementTypePrefix() local
6069 if (!poolAppendChar(&dtd->pool, *s)) in setElementTypePrefix()
6072 if (!poolAppendChar(&dtd->pool, XML_T('\0'))) in setElementTypePrefix()
6074 prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool), in setElementTypePrefix()
6078 if (prefix->name == poolStart(&dtd->pool)) in setElementTypePrefix()
6079 poolFinish(&dtd->pool); in setElementTypePrefix()
6081 poolDiscard(&dtd->pool); in setElementTypePrefix()
6093 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in getAttributeId() local
6096 if (!poolAppendChar(&dtd->pool, XML_T('\0'))) in getAttributeId()
6098 name = poolStoreString(&dtd->pool, enc, start, end); in getAttributeId()
6103 id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name, sizeof(ATTRIBUTE_ID)); in getAttributeId()
6107 poolDiscard(&dtd->pool); in getAttributeId()
6109 poolFinish(&dtd->pool); in getAttributeId()
6119 id->prefix = &dtd->defaultPrefix; in getAttributeId()
6121 id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6, sizeof(PREFIX)); in getAttributeId()
6131 if (!poolAppendChar(&dtd->pool, name[j])) in getAttributeId()
6134 if (!poolAppendChar(&dtd->pool, XML_T('\0'))) in getAttributeId()
6136 id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool), in getAttributeId()
6140 if (id->prefix->name == poolStart(&dtd->pool)) in getAttributeId()
6141 poolFinish(&dtd->pool); in getAttributeId()
6143 poolDiscard(&dtd->pool); in getAttributeId()
6157 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in getContext() local
6161 if (dtd->defaultPrefix.binding) { in getContext()
6166 len = dtd->defaultPrefix.binding->uriLen; in getContext()
6170 if (!poolAppendChar(&parser->m_tempPool, dtd->defaultPrefix.binding->uri[i])) { in getContext()
6196 hashTableIterInit(&iter, &(dtd->prefixes)); in getContext()
6230 hashTableIterInit(&iter, &(dtd->generalEntities)); in getContext()
6254 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in setContext() local
6262 e = (ENTITY *)lookup(parser, &dtd->generalEntities, poolStart(&parser->m_tempPool), 0); in setContext()
6273 prefix = &dtd->defaultPrefix; in setContext()
6277 prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&parser->m_tempPool), in setContext()
6282 prefix->name = poolCopyString(&dtd->pool, prefix->name); in setContext()
7067 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in nextScaffoldPart() local
7071 if (!dtd->scaffIndex) { in nextScaffoldPart()
7072 dtd->scaffIndex = (int *)MALLOC(parser, parser->m_groupSize * sizeof(int)); in nextScaffoldPart()
7073 if (!dtd->scaffIndex) in nextScaffoldPart()
7075 dtd->scaffIndex[0] = 0; in nextScaffoldPart()
7078 if (dtd->scaffCount >= dtd->scaffSize) { in nextScaffoldPart()
7080 if (dtd->scaffold) { in nextScaffoldPart()
7082 REALLOC(parser, dtd->scaffold, dtd->scaffSize * 2 * sizeof(CONTENT_SCAFFOLD)); in nextScaffoldPart()
7085 dtd->scaffSize *= 2; in nextScaffoldPart()
7092 dtd->scaffSize = INIT_SCAFFOLD_ELEMENTS; in nextScaffoldPart()
7094 dtd->scaffold = temp; in nextScaffoldPart()
7096 next = dtd->scaffCount++; in nextScaffoldPart()
7097 me = &dtd->scaffold[next]; in nextScaffoldPart()
7098 if (dtd->scaffLevel) { in nextScaffoldPart()
7099 CONTENT_SCAFFOLD *parent = &dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel-1]]; in nextScaffoldPart()
7101 dtd->scaffold[parent->lastchild].nextsib = next; in nextScaffoldPart()
7119 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in build_node() local
7120 dest->type = dtd->scaffold[src_node].type; in build_node()
7121 dest->quant = dtd->scaffold[src_node].quant; in build_node()
7125 src = dtd->scaffold[src_node].name; in build_node()
7138 dest->numchildren = dtd->scaffold[src_node].childcnt; in build_node()
7141 for (i = 0, cn = dtd->scaffold[src_node].firstchild; in build_node()
7143 i++, cn = dtd->scaffold[cn].nextsib) { in build_node()
7153 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in build_model() local
7157 int allocsize = (dtd->scaffCount * sizeof(XML_Content) in build_model()
7158 + (dtd->contentStringLen * sizeof(XML_Char))); in build_model()
7164 str = (XML_Char *) (&ret[dtd->scaffCount]); in build_model()
7177 DTD * const dtd = parser->m_dtd; /* save one level of indirection */ in getElementType() local
7178 const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end); in getElementType()
7183 ret = (ELEMENT_TYPE *) lookup(parser, &dtd->elementTypes, name, sizeof(ELEMENT_TYPE)); in getElementType()
7187 poolDiscard(&dtd->pool); in getElementType()
7189 poolFinish(&dtd->pool); in getElementType()