| 3636 | */ |
| 3637 | |
| 3638 | static const xmlChar * |
| 3639 | htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) { |
| 3640 | const xmlChar *name; |
| 3641 | xmlChar *val = NULL; |
| 3642 | |
| 3643 | *value = NULL; |
| 3644 | name = htmlParseHTMLName(ctxt); |
| 3645 | if (name == NULL) { |
| 3646 | htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED, |
| 3647 | "error parsing attribute name\n", NULL, NULL); |
| 3648 | return(NULL); |
| 3649 | } |
| 3650 | |
| 3651 | /* |
| 3652 | * read the value |
| 3653 | */ |
| 3654 | SKIP_BLANKS; |
| 3655 | if (CUR == '=') { |
| 3656 | NEXT; |
| 3657 | SKIP_BLANKS; |
| 3658 | val = htmlParseAttValue(ctxt); |
| 3659 | } |
| 3660 | |
| 3661 | *value = val; |
| 3662 | return(name); |
| 3663 | } |
| 3664 | |
| 3665 | /** |
| 3666 | * htmlCheckEncoding: |
no test coverage detected