MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlIsMixedElement

Function xmlIsMixedElement

ThirdParty/libxml2/vtklibxml2/valid.c:3200–3225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3198 */
3199
3200int
3201xmlIsMixedElement(xmlDocPtr doc, const xmlChar *name) {
3202 xmlElementPtr elemDecl;
3203
3204 if ((doc == NULL) || (doc->intSubset == NULL)) return(-1);
3205
3206 elemDecl = xmlGetDtdElementDesc(doc->intSubset, name);
3207 if ((elemDecl == NULL) && (doc->extSubset != NULL))
3208 elemDecl = xmlGetDtdElementDesc(doc->extSubset, name);
3209 if (elemDecl == NULL) return(-1);
3210 switch (elemDecl->etype) {
3211 case XML_ELEMENT_TYPE_UNDEFINED:
3212 return(-1);
3213 case XML_ELEMENT_TYPE_ELEMENT:
3214 return(0);
3215 case XML_ELEMENT_TYPE_EMPTY:
3216 /*
3217 * return 1 for EMPTY since we want VC error to pop up
3218 * on <empty> </empty> for example
3219 */
3220 case XML_ELEMENT_TYPE_ANY:
3221 case XML_ELEMENT_TYPE_MIXED:
3222 return(1);
3223 }
3224 return(1);
3225}
3226
3227#ifdef LIBXML_VALID_ENABLED
3228

Callers

nothing calls this directly

Calls 1

xmlGetDtdElementDescFunction · 0.85

Tested by

no test coverage detected