* htmlElementAllowedHere: * @parent: HTML parent element * @elt: HTML element * * Checks whether an HTML element may be a direct child of a parent element. * Note - doesn't check for deprecated elements * * Returns 1 if allowed; 0 otherwise. */
| 6019 | * Returns 1 if allowed; 0 otherwise. |
| 6020 | */ |
| 6021 | int |
| 6022 | htmlElementAllowedHere(const htmlElemDesc* parent, const xmlChar* elt) { |
| 6023 | const char** p ; |
| 6024 | |
| 6025 | if ( ! elt || ! parent || ! parent->subelts ) |
| 6026 | return 0 ; |
| 6027 | |
| 6028 | for ( p = parent->subelts; *p; ++p ) |
| 6029 | if ( !xmlStrcmp((const xmlChar *)*p, elt) ) |
| 6030 | return 1 ; |
| 6031 | |
| 6032 | return 0 ; |
| 6033 | } |
| 6034 | /** |
| 6035 | * htmlElementStatusHere: |
| 6036 | * @parent: HTML parent element |
no test coverage detected