| 3198 | */ |
| 3199 | |
| 3200 | int |
| 3201 | xmlIsMixedElement(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 |
nothing calls this directly
no test coverage detected